1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Gewaer\Middleware; |
||
6 | |||
7 | use Gewaer\Http\Request; |
||
8 | use Gewaer\Traits\QueryTrait; |
||
0 ignored issues
–
show
|
|||
9 | use Gewaer\Traits\ResponseTrait; |
||
10 | use Gewaer\Traits\TokenTrait; |
||
11 | use Phalcon\Mvc\Micro\MiddlewareInterface; |
||
12 | use Gewaer\Exception\NotFoundHttpException; |
||
13 | |||
14 | /** |
||
15 | * Class AuthenticationMiddleware. |
||
16 | * |
||
17 | * @package Niden\Middleware |
||
18 | */ |
||
19 | abstract class TokenBase implements MiddlewareInterface |
||
20 | { |
||
21 | use ResponseTrait; |
||
0 ignored issues
–
show
|
|||
22 | use TokenTrait; |
||
23 | |||
24 | /** |
||
25 | * @param Request $request |
||
26 | * |
||
27 | * @return bool |
||
28 | */ |
||
29 | 69 | protected function isValidCheck(Request $request): bool |
|
30 | { |
||
31 | 69 | if (!$request->ignoreJwt() && $request->isEmptyBearerToken()) { |
|
32 | 1 | throw new NotFoundHttpException('Missing Token'); |
|
33 | } |
||
34 | |||
35 | return ( |
||
36 | 68 | true !== $request->ignoreJwt() |
|
37 | ); |
||
38 | } |
||
39 | } |
||
40 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths