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.

Channel::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 2
rs 10
c 0
b 0
f 0
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 196
    public function __construct(int $value)
13
    {
14 196
        if ($value < 0) {
15 2
            throw new DomainException;
16
        }
17
18 194
        $this->value = $value;
19 194
    }
20
21 194
    public function toInt(): int
22
    {
23 194
        return $this->value;
24
    }
25
}
26