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 ( b5f9de...0f6c0d )
by Baptiste
01:38
created

TuneOk::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 7
cts 7
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 9
nc 2
nop 3
crap 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Model\Connection;
5
6
use Innmind\AMQP\Exception\DomainException;
7
use Innmind\TimeContinuum\ElapsedPeriod;
8
9
final class TuneOk
10
{
11
    private $maxChannels;
12
    private $maxFrameSize;
13
    private $heartbeat;
14
15 3
    public function __construct(
16
        int $maxChannels,
17
        int $maxFrameSize,
18
        ElapsedPeriod $heartbeat
19
    ) {
20 3
        if (min($maxChannels, $maxFrameSize) < 0) {
21 2
            throw new DomainException;
22
        }
23
24 1
        $this->maxChannels = $maxChannels;
25 1
        $this->maxFrameSize = $maxFrameSize;
26 1
        $this->heartbeat = $heartbeat;
27 1
    }
28
29 1
    public function maxChannels(): int
30
    {
31 1
        return $this->maxChannels;
32
    }
33
34 1
    public function maxFrameSize(): int
35
    {
36 1
        return $this->maxFrameSize;
37
    }
38
39 1
    public function heartbeat(): ElapsedPeriod
40
    {
41 1
        return $this->heartbeat;
42
    }
43
}
44