Mercurial > hg > cmmr2012-drupal-site
comparison vendor/sebastian/diff/src/Diff.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 Diff |
14 */ | |
15 class Diff | |
16 { | 14 { |
17 /** | 15 /** |
18 * @var string | 16 * @var string |
19 */ | 17 */ |
20 private $from; | 18 private $from; |
32 /** | 30 /** |
33 * @param string $from | 31 * @param string $from |
34 * @param string $to | 32 * @param string $to |
35 * @param Chunk[] $chunks | 33 * @param Chunk[] $chunks |
36 */ | 34 */ |
37 public function __construct($from, $to, array $chunks = array()) | 35 public function __construct(string $from, string $to, array $chunks = []) |
38 { | 36 { |
39 $this->from = $from; | 37 $this->from = $from; |
40 $this->to = $to; | 38 $this->to = $to; |
41 $this->chunks = $chunks; | 39 $this->chunks = $chunks; |
42 } | 40 } |
43 | 41 |
44 /** | 42 public function getFrom(): string |
45 * @return string | |
46 */ | |
47 public function getFrom() | |
48 { | 43 { |
49 return $this->from; | 44 return $this->from; |
50 } | 45 } |
51 | 46 |
52 /** | 47 public function getTo(): string |
53 * @return string | |
54 */ | |
55 public function getTo() | |
56 { | 48 { |
57 return $this->to; | 49 return $this->to; |
58 } | 50 } |
59 | 51 |
60 /** | 52 /** |
61 * @return Chunk[] | 53 * @return Chunk[] |
62 */ | 54 */ |
63 public function getChunks() | 55 public function getChunks(): array |
64 { | 56 { |
65 return $this->chunks; | 57 return $this->chunks; |
66 } | 58 } |
67 | 59 |
68 /** | 60 /** |