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 ( 44f5b4...dc3756 )
by Baptiste
03:14
created

UnexpectedFrame   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 18
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A frame() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Exception;
5
6
use Innmind\AMQP\Transport\Frame;
7
8
final class UnexpectedFrame extends RuntimeException
9
{
10
    private $frame;
11
12 1
    public function __construct(Frame $frame, string ...$names)
13
    {
14 1
        parent::__construct(sprintf(
15 1
            'Expected %s',
16 1
            implode(' or ', $names)
17
        ));
18 1
        $this->frame = $frame;
19 1
    }
20
21
    public function frame(): Frame
22
    {
23
        return $this->frame;
24
    }
25
}
26