Passed
Pull Request — master (#55)
by
unknown
09:00
created

RowMatch   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 125
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 55.56%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 125
ccs 15
cts 27
cp 0.5556
rs 10
wmc 9
lcom 0
cbo 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A setStartInNew() 0 6 1
A setStartInOld() 0 6 1
A setEndInNew() 0 6 1
A setEndInOld() 0 6 1
A __construct() 0 8 1
A getStartInNew() 0 4 1
A getStartInOld() 0 4 1
A getEndInNew() 0 4 1
A getEndInOld() 0 4 1
1
<?php
2
3
namespace Caxy\HtmlDiff\Table;
4
5
/**
6
 * Class RowMatch.
7
 */
8
class RowMatch
9
{
10
    /**
11
     * @var int
12
     */
13
    protected $startInNew;
14
15
    /**
16
     * @var int
17
     */
18
    protected $startInOld;
19
20
    /**
21
     * @var int
22
     */
23
    protected $endInNew;
24
25
    /**
26
     * @var int
27
     */
28
    protected $endInOld;
29
30
    /**
31
     * @var float|null
32
     */
33
    protected $percentage;
34
35
    /**
36
     * RowMatch constructor.
37
     *
38
     * @param int        $startInNew
39
     * @param int        $startInOld
40
     * @param int        $endInNew
41
     * @param int        $endInOld
42
     * @param float|null $percentage
43
     */
44 1
    public function __construct($startInNew = 0, $startInOld = 0, $endInNew = 0, $endInOld = 0, $percentage = null)
45
    {
46 1
        $this->startInNew = $startInNew;
47 1
        $this->startInOld = $startInOld;
48 1
        $this->endInNew = $endInNew;
49 1
        $this->endInOld = $endInOld;
50 1
        $this->percentage = $percentage;
51 1
    }
52
53
    /**
54
     * @return int
55
     */
56 1
    public function getStartInNew()
57
    {
58 1
        return $this->startInNew;
59
    }
60
61
    /**
62
     * @param int $startInNew
63
     *
64
     * @return RowMatch
65
     */
66
    public function setStartInNew($startInNew)
67
    {
68
        $this->startInNew = $startInNew;
69
70
        return $this;
71
    }
72
73
    /**
74
     * @return int
75
     */
76 1
    public function getStartInOld()
77
    {
78 1
        return $this->startInOld;
79
    }
80
81
    /**
82
     * @param int $startInOld
83
     *
84
     * @return RowMatch
85
     */
86
    public function setStartInOld($startInOld)
87
    {
88
        $this->startInOld = $startInOld;
89
90
        return $this;
91
    }
92
93
    /**
94
     * @return int
95
     */
96 1
    public function getEndInNew()
97
    {
98 1
        return $this->endInNew;
99
    }
100
101
    /**
102
     * @param int $endInNew
103
     *
104
     * @return RowMatch
105
     */
106
    public function setEndInNew($endInNew)
107
    {
108
        $this->endInNew = $endInNew;
109
110
        return $this;
111
    }
112
113
    /**
114
     * @return int
115
     */
116 1
    public function getEndInOld()
117
    {
118 1
        return $this->endInOld;
119
    }
120
121
    /**
122
     * @param int $endInOld
123
     *
124
     * @return RowMatch
125
     */
126
    public function setEndInOld($endInOld)
127
    {
128
        $this->endInOld = $endInOld;
129
130
        return $this;
131
    }
132
}
133