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.

Code Duplication    Length = 64-64 lines in 2 locations

src/IntRange.php 1 location

@@ 6-69 (lines=64) @@
3
4
namespace Innmind\Immutable;
5
6
class IntRange implements PrimitiveInterface, \Iterator
7
{
8
    private $start;
9
    private $end;
10
    private $step;
11
    private $key;
12
    private $current;
13
14
    public function __construct(int $start, int $end, int $step = 1)
15
    {
16
        $this->start = $start;
17
        $this->end = $end;
18
        $this->step = $step;
19
        $this->key = 0;
20
        $this->current = $start;
21
    }
22
23
    public function start(): int
24
    {
25
        return $this->start;
26
    }
27
28
    public function end(): int
29
    {
30
        return $this->end;
31
    }
32
33
    public function step(): int
34
    {
35
        return $this->step;
36
    }
37
38
    public function toPrimitive(): array
39
    {
40
        return range($this->start, $this->end, $this->step);
41
    }
42
43
    public function current(): int
44
    {
45
        return $this->current;
46
    }
47
48
    public function key(): int
49
    {
50
        return $this->key;
51
    }
52
53
    public function next()
54
    {
55
        ++$this->key;
56
        $this->current += $this->step;
57
    }
58
59
    public function rewind()
60
    {
61
        $this->key = 0;
62
        $this->current = $this->start;
63
    }
64
65
    public function valid(): bool
66
    {
67
        return $this->current < $this->end;
68
    }
69
}
70

src/NumericRange.php 1 location

@@ 6-69 (lines=64) @@
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
    public function __construct(float $start, float $end, float $step = 1)
15
    {
16
        $this->start = $start;
17
        $this->end = $end;
18
        $this->step = $step;
19
        $this->key = 0;
20
        $this->current = $start;
21
    }
22
23
    public function start(): float
24
    {
25
        return $this->start;
26
    }
27
28
    public function end(): float
29
    {
30
        return $this->end;
31
    }
32
33
    public function step(): float
34
    {
35
        return $this->step;
36
    }
37
38
    public function toPrimitive(): array
39
    {
40
        return range($this->start, $this->end, $this->step);
41
    }
42
43
    public function current(): float
44
    {
45
        return $this->current;
46
    }
47
48
    public function key(): int
49
    {
50
        return $this->key;
51
    }
52
53
    public function next()
54
    {
55
        ++$this->key;
56
        $this->current += $this->step;
57
    }
58
59
    public function rewind()
60
    {
61
        $this->key = 0;
62
        $this->current = $this->start;
63
    }
64
65
    public function valid(): bool
66
    {
67
        return $this->current < $this->end;
68
    }
69
}
70