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 ( cc6581...39cc13 )
by Baptiste
01:22
created

Channel::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
crap 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Transport\Frame;
5
6
use Innmind\AMQP\Exception\DomainException;
7
8
final class Channel
9
{
10
    private $value;
11
12 3
    public function __construct(int $value)
13
    {
14 3
        if ($value < 0) {
15 1
            throw new DomainException;
16
        }
17
18 2
        $this->value = $value;
19 2
    }
20
21 2
    public function toInt(): int
22
    {
23 2
        return $this->value;
24
    }
25
}
26