AncestorComparatorResult   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 57
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setChanged() 0 3 1
A getChanges() 0 3 1
A isChanged() 0 3 1
A getHtmlLayoutChanges() 0 3 1
A setHtmlLayoutChanges() 0 3 1
A setChanges() 0 3 1
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