Mercurial > hg > cmmr2012-drupal-site
comparison vendor/sebastian/diff/src/Line.php @ 2:5311817fb629
Theme updates
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 13:19:18 +0000 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
1:0b0e5f3b1e83 | 2:5311817fb629 |
---|---|
1 <?php | 1 <?php declare(strict_types=1); |
2 /* | 2 /* |
3 * This file is part of the Diff package. | 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 * |
7 * For the full copyright and license information, please view the LICENSE | 7 * For the full copyright and license information, please view the LICENSE |
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 /** | 13 final class Line |
14 */ | |
15 class Line | |
16 { | 14 { |
17 const ADDED = 1; | 15 const ADDED = 1; |
18 const REMOVED = 2; | 16 const REMOVED = 2; |
19 const UNCHANGED = 3; | 17 const UNCHANGED = 3; |
20 | 18 |
26 /** | 24 /** |
27 * @var string | 25 * @var string |
28 */ | 26 */ |
29 private $content; | 27 private $content; |
30 | 28 |
31 /** | 29 public function __construct(int $type = self::UNCHANGED, string $content = '') |
32 * @param int $type | |
33 * @param string $content | |
34 */ | |
35 public function __construct($type = self::UNCHANGED, $content = '') | |
36 { | 30 { |
37 $this->type = $type; | 31 $this->type = $type; |
38 $this->content = $content; | 32 $this->content = $content; |
39 } | 33 } |
40 | 34 |
41 /** | 35 public function getContent(): string |
42 * @return string | |
43 */ | |
44 public function getContent() | |
45 { | 36 { |
46 return $this->content; | 37 return $this->content; |
47 } | 38 } |
48 | 39 |
49 /** | 40 public function getType(): int |
50 * @return int | |
51 */ | |
52 public function getType() | |
53 { | 41 { |
54 return $this->type; | 42 return $this->type; |
55 } | 43 } |
56 } | 44 } |