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 ( 8cad20...343767 )
by Cees-Jan
11:09
created

StreamingResponse::getResponse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Foundation\Transport;
4
5
use Psr\Http\Message\ResponseInterface;
6
use Rx\Disposable\EmptyDisposable;
7
use Rx\DisposableInterface;
8
use Rx\Observable;
9
use Rx\ObserverInterface;
10
use Rx\SchedulerInterface;
11
12
final class StreamingResponse extends Observable
13
{
14
    /**
15
     * @var ResponseInterface
16
     */
17
    private $response;
18
19
    /**
20
     * @param ResponseInterface $response
21
     */
22
    public function __construct(ResponseInterface $response)
23
    {
24
        $this->response = $response;
25
    }
26
27
    /**
28
     * @return ResponseInterface
29
     */
30
    public function getResponse(): ResponseInterface
31
    {
32
        return $this->response;
33
    }
34
35
    /**
36
     * @param ObserverInterface $observer
37
     * @return DisposableInterface
38
     * @ignoreCodeCoverage
39
     */
40
    // @codingStandardsIgnoreStart
41
    protected function _subscribe(ObserverInterface $observer): DisposableInterface
42
    {
43
        // @codingStandardsIgnoreEnd
44
        $body = $this->response->getBody();
45
        $body->on('data', [$observer, 'onNext']);
46
        $body->on('error', [$observer, 'onError']);
47
        $body->on('end', [$observer, 'onCompleted']);
48
49
        return new EmptyDisposable();
50
    }
51
}
52