AncestorComparatorResult::setHtmlLayoutChanges()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * (c) Steve Nebes <[email protected]>
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
declare(strict_types=1);
10
11
namespace SN\DaisyDiff\Html\Ancestor;
12
13
use SN\DaisyDiff\Html\Modification\HtmlLayoutChange;
14
15
/**
16
 * AncestorComparatorResult model.
17
 */
18
class AncestorComparatorResult
19
{
20
    /** @var bool */
21
    private $changed = false;
22
23
    /** @var string */
24
    private $changes = '';
25
26
    /** @var HtmlLayoutChange[] */
27
    private $htmlLayoutChanges = [];
28
29
    /**
30
     * @return bool
31
     */
32 46
    public function isChanged(): bool
33
    {
34 46
        return $this->changed;
35
    }
36
37
    /**
38
     * @param bool $value
39
     */
40 22
    public function setChanged(bool $value): void
41
    {
42 22
        $this->changed = $value;
43 22
    }
44
45
    /**
46
     * @return string
47
     */
48 22
    public function getChanges(): string
49
    {
50 22
        return $this->changes;
51
    }
52
53
    /**
54
     * @param string|null $value
55
     */
56 22
    public function setChanges(?string $value): void
57
    {
58 22
        $this->changes = $value ?? '';
59 22
    }
60
61
    /**
62
     * @return HtmlLayoutChange[]
63
     */
64 22
    public function getHtmlLayoutChanges(): array
65
    {
66 22
        return $this->htmlLayoutChanges;
67
    }
68
69
    /**
70
     * @param HtmlLayoutChange[] $value
71
     */
72 22
    public function setHtmlLayoutChanges(?array $value): void
73
    {
74 22
        $this->htmlLayoutChanges = $value ?? [];
75 22
    }
76
}
77