| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function handle($request, \Closure $next) |
||
| 29 | { |
||
| 30 | $token = $this->bearerToken->getToken(); |
||
| 31 | if (true === $this->jwt->verify($token)) { |
||
| 32 | // 自动注入用户模型 |
||
| 33 | if ($this->jwt->injectUser()) { |
||
| 34 | $user = $this->jwt->user(); |
||
| 35 | // 路由注入 |
||
| 36 | $request->user = $user; |
||
| 37 | |||
| 38 | // 依赖注入 |
||
| 39 | $model = $this->jwt->userModel(); |
||
| 40 | $this->app->bind($model, $user); |
||
| 41 | } |
||
| 42 | |||
| 43 | $request->jwt = $this->jwt; |
||
| 44 | |||
| 45 | return $next($request); |
||
| 46 | } |
||
| 47 | |||
| 48 | throw new JWTException('Token 验证不通过', 401); |
||
| 49 | } |
||
| 51 |
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