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 ( faae32...638f88 )
by Baptiste
03:29
created

Method::method()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
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 9
    public function __construct(int $class, int $method)
14
    {
15 9
        if ($class < 0 || $method < 0) {
16 2
            throw new DomainException;
17
        }
18
19 7
        $this->class = $class;
20 7
        $this->method = $method;
21 7
    }
22
23
    public function class(): int
0 ignored issues
show
Coding Style introduced by
Possible parse error: non-abstract method defined as abstract
Loading history...
24
    {
25
        return $this->class;
26
    }
27
28 1
    public function method(): int
29
    {
30 1
        return $this->method;
31
    }
32
33
    public function equals(self $method): bool
34
    {
35
        return $this->class === $method->class && $this->method === $method->method;
36
    }
37
}
38