HtmlLayoutChange   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getOpeningTag() 0 3 1
A setType() 0 3 1
A setOpeningTag() 0 3 1
A getType() 0 3 1
A setEndingTag() 0 3 1
A getEndingTag() 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\Modification;
12
13
/**
14
 * This class holds the removal or addition of HTML tags around text. It contains the same information that is presented
15
 * in the tooltips of default Daisy Diff HTML output.
16
 *
17
 * This class is not used internally by DaisyDiff. It does not take any part in the diff process. It is simply provided
18
 * for applications that use the DaisyDiff library and need more information on the results.
19
 */
20
final class HtmlLayoutChange
21
{
22
    /** @const string */
23
    const TAG_ADDED   = 'added';
24
    const TAG_REMOVED = 'removed';
25
26
    /** @var string */
27
    private $type;
28
29
    /** @var string */
30
    private $openingTag = '';
31
32
    /** @var string */
33
    private $endingTag = '';
34
35
    /**
36
     * @return string|null
37
     */
38 1
    public function getType(): ?string
39
    {
40 1
        return $this->type;
41
    }
42
43
    /**
44
     * @param string|null $value
45
     */
46 23
    public function setType(?string $value): void
47
    {
48 23
        $this->type = $value;
49 23
    }
50
51
    /**
52
     * @return string|null
53
     */
54 1
    public function getOpeningTag(): ?string
55
    {
56 1
        return $this->openingTag;
57
    }
58
59
    /**
60
     * @param string|null $value
61
     */
62 23
    public function setOpeningTag(?string $value): void
63
    {
64 23
        $this->openingTag = $value;
65 23
    }
66
67
    /**
68
     * @return string|null
69
     */
70 1
    public function getEndingTag(): ?string
71
    {
72 1
        return $this->endingTag;
73
    }
74
75
    /**
76
     * @param string|null $value
77
     */
78 23
    public function setEndingTag(?string $value): void
79
    {
80 23
        $this->endingTag = $value;
81 23
    }
82
}
83