Mercurial > hg > isophonics-drupal-site
comparison vendor/sebastian/diff/src/Chunk.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 7a779792577d |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php | 1 <?php declare(strict_types=1); |
2 /* | 2 /* |
3 * This file is part of sebastian/diff. | 3 * This file is part of sebastian/diff. |
4 * | 4 * |
5 * (c) Sebastian Bergmann <sebastian@phpunit.de> | 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> |
6 * | 6 * |
8 * file that was distributed with this source code. | 8 * file that was distributed with this source code. |
9 */ | 9 */ |
10 | 10 |
11 namespace SebastianBergmann\Diff; | 11 namespace SebastianBergmann\Diff; |
12 | 12 |
13 class Chunk | 13 final class Chunk |
14 { | 14 { |
15 /** | 15 /** |
16 * @var int | 16 * @var int |
17 */ | 17 */ |
18 private $start; | 18 private $start; |
35 /** | 35 /** |
36 * @var array | 36 * @var array |
37 */ | 37 */ |
38 private $lines; | 38 private $lines; |
39 | 39 |
40 /** | 40 public function __construct(int $start = 0, int $startRange = 1, int $end = 0, int $endRange = 1, array $lines = []) |
41 * @param int $start | |
42 * @param int $startRange | |
43 * @param int $end | |
44 * @param int $endRange | |
45 * @param array $lines | |
46 */ | |
47 public function __construct($start = 0, $startRange = 1, $end = 0, $endRange = 1, array $lines = array()) | |
48 { | 41 { |
49 $this->start = (int) $start; | 42 $this->start = $start; |
50 $this->startRange = (int) $startRange; | 43 $this->startRange = $startRange; |
51 $this->end = (int) $end; | 44 $this->end = $end; |
52 $this->endRange = (int) $endRange; | 45 $this->endRange = $endRange; |
53 $this->lines = $lines; | 46 $this->lines = $lines; |
54 } | 47 } |
55 | 48 |
56 /** | 49 public function getStart(): int |
57 * @return int | |
58 */ | |
59 public function getStart() | |
60 { | 50 { |
61 return $this->start; | 51 return $this->start; |
62 } | 52 } |
63 | 53 |
64 /** | 54 public function getStartRange(): int |
65 * @return int | |
66 */ | |
67 public function getStartRange() | |
68 { | 55 { |
69 return $this->startRange; | 56 return $this->startRange; |
70 } | 57 } |
71 | 58 |
72 /** | 59 public function getEnd(): int |
73 * @return int | |
74 */ | |
75 public function getEnd() | |
76 { | 60 { |
77 return $this->end; | 61 return $this->end; |
78 } | 62 } |
79 | 63 |
80 /** | 64 public function getEndRange(): int |
81 * @return int | |
82 */ | |
83 public function getEndRange() | |
84 { | 65 { |
85 return $this->endRange; | 66 return $this->endRange; |
86 } | 67 } |
87 | 68 |
88 /** | 69 public function getLines(): array |
89 * @return array | |
90 */ | |
91 public function getLines() | |
92 { | 70 { |
93 return $this->lines; | 71 return $this->lines; |
94 } | 72 } |
95 | 73 |
96 /** | |
97 * @param array $lines | |
98 */ | |
99 public function setLines(array $lines) | 74 public function setLines(array $lines) |
100 { | 75 { |
101 $this->lines = $lines; | 76 $this->lines = $lines; |
102 } | 77 } |
103 } | 78 } |