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 ( 638f88...e189ab )
by Baptiste
01:40
created

Method   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 7
lcom 1
cbo 1
dl 0
loc 30
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 3
A class() 0 4 1
A method() 0 4 1
A equals() 0 4 2
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 11
    public function __construct(int $class, int $method)
14
    {
15 11
        if ($class < 0 || $method < 0) {
16 2
            throw new DomainException;
17
        }
18
19 9
        $this->class = $class;
20 9
        $this->method = $method;
21 9
    }
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 8
    public function method(): int
29
    {
30 8
        return $this->method;
31
    }
32
33 64
    public function equals(self $method): bool
34
    {
35 64
        return $this->class === $method->class && $this->method === $method->method;
36
    }
37
}
38