| Conditions | 3 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function register(DiInterface $container) |
||
| 17 | { |
||
| 18 | $config = $container->getShared('config'); |
||
| 19 | |||
| 20 | $container->setShared( |
||
| 21 | 'app', |
||
| 22 | function () use ($config) { |
||
| 23 | $request = new Request(); |
||
| 24 | $appKey = $request->hasHeader('KanvasKey') ? $request->getHeader('KanvasKey') : $config->app->id; |
||
| 25 | $app = Apps::findFirstByKey($appKey); |
||
| 26 | if (!$app) { |
||
| 27 | throw new InternalServerErrorException('No App configure with this key ' . $appKey); |
||
| 28 | } |
||
| 29 | return $app; |
||
| 30 | } |
||
| 34 |
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