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::class()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 0
cp 0
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 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