Passed
Push — master ( d7540c...231250 )
by Josh
05:57
created

Match::count()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Caxy\HtmlDiff;
4
5
class Match implements \Countable
6
{
7
    public $startInOld;
8
    public $startInNew;
9
    public $size;
10
11 15
    public function __construct($startInOld, $startInNew, $size)
12
    {
13 15
        $this->startInOld = $startInOld;
14 15
        $this->startInNew = $startInNew;
15 15
        $this->size = $size;
16 15
    }
17
18 15
    public function endInOld()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
19
    {
20 15
        return $this->startInOld + $this->size;
21
    }
22
23 15
    public function endInNew()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
24
    {
25 15
        return $this->startInNew + $this->size;
26
    }
27
28 15
    public function count() {
29 15
        return (int)$this->size;
30
    }
31
}
32