| Conditions | 5 |
| Paths | 9 |
| Total Lines | 23 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function handle($request, Closure $next) |
||
| 19 | { |
||
| 20 | if (! $request->user()) { |
||
| 21 | return $next($request); |
||
| 22 | } |
||
| 23 | |||
| 24 | $company = $this->ownerRequestsTenant($request) |
||
| 25 | ? Company::find($request->get('_tenantId')) |
||
|
|
|||
| 26 | : $request->user()->company(); |
||
| 27 | if (optional($company)->isTenant()) { |
||
| 28 | Tenant::set($company); |
||
| 29 | } |
||
| 30 | |||
| 31 | MixedConnection::set( |
||
| 32 | $request->user(), |
||
| 33 | $request->has('_tenantId') |
||
| 34 | ); |
||
| 35 | |||
| 36 | if ($request->has('_tenantId')) { |
||
| 37 | $request->request->remove('_tenantId'); |
||
| 38 | } |
||
| 39 | |||
| 40 | return $next($request); |
||
| 41 | } |
||
| 48 |
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