Mercurial > hg > isophonics-drupal-site
annotate vendor/sebastian/diff/src/Line.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 1fec387a4317 |
children |
rev | line source |
---|---|
Chris@14 | 1 <?php declare(strict_types=1); |
Chris@0 | 2 /* |
Chris@12 | 3 * This file is part of sebastian/diff. |
Chris@0 | 4 * |
Chris@0 | 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> |
Chris@0 | 6 * |
Chris@0 | 7 * For the full copyright and license information, please view the LICENSE |
Chris@0 | 8 * file that was distributed with this source code. |
Chris@0 | 9 */ |
Chris@0 | 10 |
Chris@0 | 11 namespace SebastianBergmann\Diff; |
Chris@0 | 12 |
Chris@14 | 13 final class Line |
Chris@0 | 14 { |
Chris@0 | 15 const ADDED = 1; |
Chris@0 | 16 const REMOVED = 2; |
Chris@0 | 17 const UNCHANGED = 3; |
Chris@0 | 18 |
Chris@0 | 19 /** |
Chris@0 | 20 * @var int |
Chris@0 | 21 */ |
Chris@0 | 22 private $type; |
Chris@0 | 23 |
Chris@0 | 24 /** |
Chris@0 | 25 * @var string |
Chris@0 | 26 */ |
Chris@0 | 27 private $content; |
Chris@0 | 28 |
Chris@14 | 29 public function __construct(int $type = self::UNCHANGED, string $content = '') |
Chris@0 | 30 { |
Chris@0 | 31 $this->type = $type; |
Chris@0 | 32 $this->content = $content; |
Chris@0 | 33 } |
Chris@0 | 34 |
Chris@14 | 35 public function getContent(): string |
Chris@0 | 36 { |
Chris@0 | 37 return $this->content; |
Chris@0 | 38 } |
Chris@0 | 39 |
Chris@14 | 40 public function getType(): int |
Chris@0 | 41 { |
Chris@0 | 42 return $this->type; |
Chris@0 | 43 } |
Chris@0 | 44 } |