GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( 5dd8b5...0ed171 )
by Baptiste
02:38
created

NumericRange::key()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Immutable;
5
6
class NumericRange implements PrimitiveInterface, \Iterator
7
{
8
    private $start;
9
    private $end;
10
    private $step;
11
    private $key;
12
    private $current;
13
14 1
    public function __construct(float $start, float $end, float $step = 1)
15
    {
16 1
        $this->start = $start;
17 1
        $this->end = $end;
18 1
        $this->step = $step;
19 1
        $this->key = 0;
20 1
        $this->current = $start;
21 1
    }
22
23 1
    public function start(): float
24
    {
25 1
        return $this->start;
26
    }
27
28 1
    public function end(): float
29
    {
30 1
        return $this->end;
31
    }
32
33 1
    public function step(): float
34
    {
35 1
        return $this->step;
36
    }
37
38 1
    public function toPrimitive()
39
    {
40 1
        return range($this->start, $this->end, $this->step);
41
    }
42
43 1
    public function current()
44
    {
45 1
        return $this->current;
46
    }
47
48 1
    public function key()
49
    {
50 1
        return $this->key;
51
    }
52
53 1
    public function next()
54
    {
55 1
        ++$this->key;
56 1
        $this->current += $this->step;
57 1
    }
58
59 1
    public function rewind()
60
    {
61 1
        $this->key = 0;
62 1
        $this->current = $this->start;
63 1
    }
64
65 1
    public function valid()
66
    {
67 1
        return $this->current < $this->end;
68
    }
69
}
70