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

src/Phossa2/Middleware/Queue.php 2 locations

@@ 159-179 (lines=21) @@
156
     * @throws LogicException if invalid middleware type
157
     * @access protected
158
     */
159
    protected function runMiddleware(
160
        $middleware,
161
        RequestInterface $request,
162
        ResponseInterface $response
163
    )/*# : ResponseInterface */ {
164
        // instance of MiddlewareInterface
165
        if (is_object($middleware) && $middleware instanceof MiddlewareInterface) {
166
            return $middleware->process($request, $response, $this);
167
168
        // old style callable
169
        } elseif (is_callable($middleware)) {
170
            return $middleware($request, $response, $this);
171
172
        // unknown middleware type
173
        } else {
174
            throw new LogicException(
175
                Message::get(Message::MIDDLEWARE_INVALID, $middleware),
176
                Message::MIDDLEWARE_INVALID
177
            );
178
        }
179
    }
180
181
    /**
182
     * Evaluate the condition
@@ 194-214 (lines=21) @@
191
     * @throws LogicException if condition is invalid
192
     * @access protected
193
     */
194
    protected function evalCondition(
195
        $condition,
196
        RequestInterface $request,
197
        ResponseInterface $response
198
    )/*# : bool */ {
199
        // instanceof ConditionInterface
200
        if (is_object($condition) && $condition instanceof ConditionInterface) {
201
            return $condition->evaluate($request, $response);
202
203
        // old style callable
204
        } elseif (is_callable($condition)) {
205
            return $condition($request, $response);
206
207
        // unknown type
208
        } else {
209
            throw new LogicException(
210
                Message::get(Message::CONDITION_INVALID, $condition),
211
                Message::CONDITION_INVALID
212
            );
213
        }
214
    }
215
}
216