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 — master ( 58f9f5...07fe48 )
by Cees-Jan
05:39
created

AcceptXmlMiddleware   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A pre() 0 7 1
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Middleware\Xml;
4
5
use ApiClients\Foundation\Middleware\ErrorTrait;
6
use ApiClients\Foundation\Middleware\MiddlewareInterface;
7
use ApiClients\Foundation\Middleware\PostTrait;
8
use Psr\Http\Message\RequestInterface;
9
use React\Promise\CancellablePromiseInterface;
10
use function React\Promise\resolve;
11
12
class AcceptXmlMiddleware implements MiddlewareInterface
13
{
14
    use PostTrait;
15
    use ErrorTrait;
16
17
    /**
18
     * @param RequestInterface $request
19
     * @param array $options
20
     * @return CancellablePromiseInterface
21
     */
22
    public function pre(
23
        RequestInterface $request,
24
        string $transactionId,
25
        array $options = []
26
    ): CancellablePromiseInterface {
27
        return resolve($request->withAddedHeader('Accept', 'text/xml'));
28
    }
29
}
30