| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function handle($request, Closure $next) |
||
| 20 | { |
||
| 21 | $association = $request->route('association'); |
||
| 22 | |||
| 23 | if (!($association instanceof Association)) { |
||
| 24 | // FIXME: redo routes so we always get association from there instead: |
||
| 25 | $subdomain = Arr::first(explode('.', $request->getHost())); |
||
| 26 | |||
| 27 | $association = Association::where('subdomain', $subdomain)->first(); |
||
| 28 | } |
||
| 29 | |||
| 30 | if (Bouncer::can('manage', $association)) { |
||
| 31 | return $next($request); |
||
| 32 | } |
||
| 33 | else { |
||
| 34 | return redirect()->route('admin'); |
||
| 35 | } |
||
| 38 |
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