Conditions | 3 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | protected function initGlobalObjects(): void |
||
38 | { |
||
39 | container()->singleton('CMain', function () { |
||
40 | if (empty($GLOBALS['APPLICATION'])) { |
||
41 | throw new \RuntimeException('Bitrix is not initialized'); |
||
42 | } |
||
43 | |||
44 | return $GLOBALS['APPLICATION']; |
||
45 | }); |
||
46 | |||
47 | container()->singleton('CUser', function () { |
||
48 | if (empty($GLOBALS['USER'])) { |
||
49 | throw new \RuntimeException('Bitrix is not initialized'); |
||
50 | } |
||
51 | |||
52 | return $GLOBALS['USER']; |
||
53 | }); |
||
54 | |||
55 | container()->singleton('\Bitrix\Main\Application', function () { |
||
56 | return \Bitrix\Main\Application::getInstance(); |
||
|
|||
57 | }); |
||
58 | |||
59 | container()->singleton('\Bitrix\Main\EventManager', function () { |
||
60 | return \Bitrix\Main\EventManager::getInstance(); |
||
61 | }); |
||
64 |
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