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.

Range::__construct()   A
last analyzed

Complexity

Conditions 4
Paths 4

Size

Total Lines 16
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 16
rs 9.2
cc 4
eloc 8
nc 4
nop 2
1
<?php
2
3
namespace UCD\Infrastructure\Repository\CharacterRepository\FileRepository;
4
5
use IntervalTree\NumericRangeInclusive;
6
7
use UCD\Exception\InvalidArgumentException;
8
use UCD\Exception\InvalidRangeException;
9
10
class Range extends NumericRangeInclusive
11
{
12
    /**
13
     * @param int $start
14
     * @param int $end
15
     * @throws InvalidArgumentException
16
     * @throws InvalidRangeException
17
     */
18
    public function __construct($start, $end)
19
    {
20
        if (!is_int($start)) {
21
            throw new InvalidArgumentException();
22
        }
23
24
        if (!is_int($end)) {
25
            throw new InvalidArgumentException();
26
        }
27
28
        if ($start > $end) {
29
            throw new InvalidRangeException();
30
        }
31
32
        parent::__construct($start, $end, 1);
33
    }
34
}