Exception
1 year ago
Output
1 year ago
Chunk.php
1 year ago
Diff.php
1 year ago
Differ.php
1 year ago
Line.php
1 year ago
LongestCommonSubsequenceCalculator.php
1 year ago
MemoryEfficientLongestCommonSubsequenceCalculator.php
1 year ago
Parser.php
1 year ago
TimeEfficientLongestCommonSubsequenceCalculator.php
1 year ago
Line.php
46 lines
| 1 | <?php declare(strict_types=1); |
| 2 | /* |
| 3 | * This file is part of sebastian/diff. |
| 4 | * |
| 5 | * (c) Sebastian Bergmann <sebastian@phpunit.de> |
| 6 | * |
| 7 | * For the full copyright and license information, please view the LICENSE |
| 8 | * file that was distributed with this source code. |
| 9 | */ |
| 10 | namespace SebastianBergmann\Diff; |
| 11 | |
| 12 | final class Line |
| 13 | { |
| 14 | public const ADDED = 1; |
| 15 | |
| 16 | public const REMOVED = 2; |
| 17 | |
| 18 | public const UNCHANGED = 3; |
| 19 | |
| 20 | /** |
| 21 | * @var int |
| 22 | */ |
| 23 | private $type; |
| 24 | |
| 25 | /** |
| 26 | * @var string |
| 27 | */ |
| 28 | private $content; |
| 29 | |
| 30 | public function __construct(int $type = self::UNCHANGED, string $content = '') |
| 31 | { |
| 32 | $this->type = $type; |
| 33 | $this->content = $content; |
| 34 | } |
| 35 | |
| 36 | public function getContent(): string |
| 37 | { |
| 38 | return $this->content; |
| 39 | } |
| 40 | |
| 41 | public function getType(): int |
| 42 | { |
| 43 | return $this->type; |
| 44 | } |
| 45 | } |
| 46 |