| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | public function handle($request, Closure $next) |
||
| 33 | { |
||
| 34 | if (!in_array($request->ip(), $this->allowedIps->getIpArray())) { |
||
| 35 | $code = trans('ipchecker::messages.denied_access.code'); |
||
| 36 | $message = trans('ipchecker::messages.denied_access.message'); |
||
| 37 | |||
| 38 | if (in_array(config('ipchecker.api_middleware'),$request->route()->gatherMiddleware())){ |
||
| 39 | $return_array = [ |
||
| 40 | 'success'=>false, |
||
| 41 | 'code'=>$code, |
||
| 42 | 'message'=>$message, |
||
| 43 | ]; |
||
| 44 | |||
| 45 | return response()->json($return_array,200,[],JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); |
||
| 46 | } |
||
| 47 | |||
| 48 | return response()->view('ipchecker::error',compact('message','code')); |
||
| 49 | } |
||
| 50 | |||
| 51 | return $next($request); |
||
| 52 | } |
||
| 54 |
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