Mercurial > hg > isophonics-drupal-site
annotate vendor/sebastian/diff/src/Line.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 7a779792577d |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 /* |
Chris@0 | 3 * This file is part of the Diff package. |
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@0 | 13 /** |
Chris@0 | 14 */ |
Chris@0 | 15 class Line |
Chris@0 | 16 { |
Chris@0 | 17 const ADDED = 1; |
Chris@0 | 18 const REMOVED = 2; |
Chris@0 | 19 const UNCHANGED = 3; |
Chris@0 | 20 |
Chris@0 | 21 /** |
Chris@0 | 22 * @var int |
Chris@0 | 23 */ |
Chris@0 | 24 private $type; |
Chris@0 | 25 |
Chris@0 | 26 /** |
Chris@0 | 27 * @var string |
Chris@0 | 28 */ |
Chris@0 | 29 private $content; |
Chris@0 | 30 |
Chris@0 | 31 /** |
Chris@0 | 32 * @param int $type |
Chris@0 | 33 * @param string $content |
Chris@0 | 34 */ |
Chris@0 | 35 public function __construct($type = self::UNCHANGED, $content = '') |
Chris@0 | 36 { |
Chris@0 | 37 $this->type = $type; |
Chris@0 | 38 $this->content = $content; |
Chris@0 | 39 } |
Chris@0 | 40 |
Chris@0 | 41 /** |
Chris@0 | 42 * @return string |
Chris@0 | 43 */ |
Chris@0 | 44 public function getContent() |
Chris@0 | 45 { |
Chris@0 | 46 return $this->content; |
Chris@0 | 47 } |
Chris@0 | 48 |
Chris@0 | 49 /** |
Chris@0 | 50 * @return int |
Chris@0 | 51 */ |
Chris@0 | 52 public function getType() |
Chris@0 | 53 { |
Chris@0 | 54 return $this->type; |
Chris@0 | 55 } |
Chris@0 | 56 } |