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

Arguments   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 26
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __invoke() 0 13 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Transport\Frame\Visitor;
5
6
use Innmind\AMQP\Transport\Frame\Value;
7
use Innmind\Immutable\{
8
    Str,
9
    StreamInterface,
10
    Stream
11
};
12
13
final class Arguments
14
{
15
    private $types;
16
17 1
    public function __construct(string ...$types)
18
    {
19 1
        $this->types = $types;
20 1
    }
21
22
    /**
23
     * @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...
24
     */
25 1
    public function __invoke(Str $arguments): StreamInterface
26
    {
27 1
        $arguments = $arguments->toEncoding('ASCII');
28 1
        $stream = new Stream(Value::class);
29
30 1
        foreach ($this->types as $type) {
31 1
            $argument = [$type, 'cut']($arguments);
32 1
            $stream = $stream->add([$type, 'fromString']($argument));
33 1
            $arguments = $arguments->substring($argument->length());
34
        }
35
36 1
        return $stream;
37
    }
38
}
39