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 = 16-17 lines in 2 locations

src/MiddlewareRunner.php 2 locations

@@ 73-88 (lines=16) @@
70
     * @param ResponseInterface $response
71
     * @return CancellablePromiseInterface
72
     */
73
    public function post(
74
        ResponseInterface $response
75
    ): CancellablePromiseInterface {
76
        $promise = resolve($response);
77
78
        $this->middlewares = array_reverse($this->middlewares);
79
80
        foreach ($this->middlewares as $middleware) {
81
            $responseMiddleware = $middleware;
82
            $promise = $promise->then(function (ResponseInterface $response) use ($responseMiddleware) {
83
                return $responseMiddleware->post($response, $this->options);
84
            });
85
        }
86
87
        return $promise;
88
    }
89
90
    /**
91
     * @param Throwable $throwable
@@ 94-110 (lines=17) @@
91
     * @param Throwable $throwable
92
     * @return CancellablePromiseInterface
93
     */
94
    public function error(
95
        Throwable $throwable
96
    ): CancellablePromiseInterface {
97
98
        $promise = reject($throwable);
99
100
        $this->middlewares = array_reverse($this->middlewares);
101
102
        foreach ($this->middlewares as $middleware) {
103
            $errorMiddleware = $middleware;
104
            $promise = $promise->then(null, function (Throwable $throwable) use ($errorMiddleware) {
105
                return reject($errorMiddleware->error($throwable, $this->options));
106
            });
107
        }
108
109
        return $promise;
110
    }
111
}
112