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.

Code Duplication    Length = 12-12 lines in 2 locations

src/Middleware/BufferedSinkMiddleware.php 1 location

@@ 25-36 (lines=12) @@
22
     * @param array $options
23
     * @return CancellablePromiseInterface
24
     */
25
    public function post(ResponseInterface $response, array $options = []): CancellablePromiseInterface
26
    {
27
        if (!($response->getBody() instanceof ReadableStreamInterface)) {
28
            return resolve($response);
29
        }
30
31
        return BufferedSink::createPromise($response->getBody())->then(function (string $body) use ($response) {
32
            $stream = new BufferStream(strlen($body));
33
            $stream->write($body);
34
            return resolve($response->withBody($stream));
35
        });
36
    }
37
}
38

src/Middleware/JsonEncodeMiddleware.php 1 location

@@ 44-55 (lines=12) @@
41
     * @param array $options
42
     * @return CancellablePromiseInterface
43
     */
44
    public function pre(RequestInterface $request, array $options = []): CancellablePromiseInterface
45
    {
46
        if (!($request->getBody() instanceof JsonStream)) {
47
            return resolve($request);
48
        }
49
50
        return $this->jsonEncodeService->handle($request->getBody()->getJson())->then(function ($json) use ($request) {
51
            $body = new BufferStream(strlen($json));
52
            $body->write($json);
53
            return resolve($request->withBody($body));
54
        });
55
    }
56
}
57