Conditions | 3 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | protected function initGlobalObjects(): void |
||
35 | { |
||
36 | container()->singleton('CMain', function () { |
||
37 | if (empty($GLOBALS['APPLICATION'])) { |
||
38 | throw new \RuntimeException('Bitrix is not initialized'); |
||
39 | } |
||
40 | |||
41 | return $GLOBALS['APPLICATION']; |
||
42 | }); |
||
43 | |||
44 | container()->singleton('CUser', function () { |
||
45 | if (empty($GLOBALS['USER'])) { |
||
46 | throw new \RuntimeException('Bitrix is not initialized'); |
||
47 | } |
||
48 | |||
49 | return $GLOBALS['USER']; |
||
50 | }); |
||
53 |
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