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

Exchange   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 15.38%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 2
dl 0
loc 33
ccs 2
cts 13
cp 0.1538
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 17 3
A declareOk() 0 4 1
A deleteOk() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Transport\Protocol\v091\Reader;
5
6
use Innmind\AMQP\{
7
    Transport\Frame\Method,
8
    Transport\Frame\Visitor\Arguments,
9
    Transport\Protocol\v091\Methods,
10
    Exception\UnknownMethod
11
};
12
use Innmind\Immutable\{
13
    Str,
14
    StreamInterface
15
};
16
17
final class Exchange
18
{
19
    /**
20
     * @return StreamInterface<Value>
0 ignored issues
show
Documentation introduced by
The doc-type StreamInterface<Value> could not be parsed: Expected "|" or "end of type", but got "<" at position 15. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
21
     */
22 1
    public function __invoke(Method $method, Str $arguments): StreamInterface
23
    {
24
        switch (true) {
25 1
            case Methods::get('exchange.declare-ok')->equals($method):
26
                $visit = $this->declareOk();
27
                break;
28
29
            case Methods::get('exchange.delete-ok')->equals($method):
30
                $visit = $this->deleteOk();
31
                break;
32
33
            default:
34
                throw new UnknownMethod($method);
35
        }
36
37
        return $visit($arguments);
38
    }
39
40
    private function declareOk(): Arguments
41
    {
42
        return new Arguments; //no arguments
43
    }
44
45
    private function deleteOk(): Arguments
46
    {
47
        return new Arguments; //no arguments
48
    }
49
}
50