Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of sebastian/diff.
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
namespace SebastianBergmann\Diff;
11
 
12
final class Diff
13
{
14
    /**
15
     * @var string
16
     */
17
    private $from;
18
 
19
    /**
20
     * @var string
21
     */
22
    private $to;
23
 
24
    /**
25
     * @var Chunk[]
26
     */
27
    private $chunks;
28
 
29
    /**
30
     * @param Chunk[] $chunks
31
     */
32
    public function __construct(string $from, string $to, array $chunks = [])
33
    {
34
        $this->from   = $from;
35
        $this->to     = $to;
36
        $this->chunks = $chunks;
37
    }
38
 
39
    public function getFrom(): string
40
    {
41
        return $this->from;
42
    }
43
 
44
    public function getTo(): string
45
    {
46
        return $this->to;
47
    }
48
 
49
    /**
50
     * @return Chunk[]
51
     */
52
    public function getChunks(): array
53
    {
54
        return $this->chunks;
55
    }
56
 
57
    /**
58
     * @param Chunk[] $chunks
59
     */
60
    public function setChunks(array $chunks): void
61
    {
62
        $this->chunks = $chunks;
63
    }
64
}