Mercurial > hg > isophonics-drupal-site
comparison vendor/sebastian/diff/src/Diff.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 7a779792577d |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 /* | |
3 * This file is part of the Diff package. | |
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 | |
11 namespace SebastianBergmann\Diff; | |
12 | |
13 /** | |
14 */ | |
15 class Diff | |
16 { | |
17 /** | |
18 * @var string | |
19 */ | |
20 private $from; | |
21 | |
22 /** | |
23 * @var string | |
24 */ | |
25 private $to; | |
26 | |
27 /** | |
28 * @var Chunk[] | |
29 */ | |
30 private $chunks; | |
31 | |
32 /** | |
33 * @param string $from | |
34 * @param string $to | |
35 * @param Chunk[] $chunks | |
36 */ | |
37 public function __construct($from, $to, array $chunks = array()) | |
38 { | |
39 $this->from = $from; | |
40 $this->to = $to; | |
41 $this->chunks = $chunks; | |
42 } | |
43 | |
44 /** | |
45 * @return string | |
46 */ | |
47 public function getFrom() | |
48 { | |
49 return $this->from; | |
50 } | |
51 | |
52 /** | |
53 * @return string | |
54 */ | |
55 public function getTo() | |
56 { | |
57 return $this->to; | |
58 } | |
59 | |
60 /** | |
61 * @return Chunk[] | |
62 */ | |
63 public function getChunks() | |
64 { | |
65 return $this->chunks; | |
66 } | |
67 | |
68 /** | |
69 * @param Chunk[] $chunks | |
70 */ | |
71 public function setChunks(array $chunks) | |
72 { | |
73 $this->chunks = $chunks; | |
74 } | |
75 } |