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
Pull Request — master (#65)
by Ha
04:16
created

HandlerStack::create()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 9.6666
cc 2
eloc 5
nc 1
nop 1
crap 2
1
<?php declare (strict_types=1);
2
3
namespace OpenStack\Common\Transport;
4
5
use function GuzzleHttp\choose_handler;
6
use GuzzleHttp\HandlerStack as GuzzleStack;
7
8
class HandlerStack extends GuzzleStack
9
{
10 7
    public static function create(callable $handler = null): self
11
    {
12 7
        $stack = new self($handler ?: choose_handler());
13
14 7
        $stack->push(Middleware::httpErrors());
15 7
        $stack->push(Middleware::prepareBody());
16
17 7
        return $stack;
18
    }
19
}
20