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.

Method   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 28
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 7

4 Methods

Rating   Name   Duplication   Size   Complexity  
A class() 0 3 1
A equals() 0 3 2
A method() 0 3 1
A __construct() 0 8 3
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 Method
9
{
10
    private $class;
11
    private $method;
12
13 286
    public function __construct(int $class, int $method)
14
    {
15 286
        if ($class < 0 || $method < 0) {
16 4
            throw new DomainException;
17
        }
18
19 282
        $this->class = $class;
20 282
        $this->method = $method;
21 282
    }
22
23
    public function class(): int
24
    {
25
        return $this->class;
26
    }
27
28 186
    public function method(): int
29
    {
30 186
        return $this->method;
31
    }
32
33 386
    public function equals(self $method): bool
34
    {
35 386
        return $this->class === $method->class && $this->method === $method->method;
36
    }
37
}
38