| Conditions | 2 |
| Paths | 2 |
| Total Lines | 29 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function getServiceContainer() |
||
| 31 | { |
||
| 32 | if (!isset(static::$serviceContainer)) { |
||
| 33 | $config = include __DIR__ . '/../../../../../../../../config.php'; |
||
| 34 | $installDir = $config['install_dir']; |
||
| 35 | |||
| 36 | /** @var \Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder */ |
||
| 37 | $containerBuilder = include $config['container_builder_path']; |
||
| 38 | |||
| 39 | /* @var \Symfony\Component\DependencyInjection\Loader\YamlFileLoader $loader */ |
||
| 40 | $loader->load('search_engines/legacy.yml'); |
||
|
|
|||
| 41 | $loader->load('tests/integration_legacy_core.yml'); |
||
| 42 | |||
| 43 | $containerBuilder->setParameter( |
||
| 44 | 'legacy_dsn', |
||
| 45 | static::$dsn |
||
| 46 | ); |
||
| 47 | |||
| 48 | static::$serviceContainer = new ServiceContainer( |
||
| 49 | $containerBuilder, |
||
| 50 | $installDir, |
||
| 51 | $config['cache_dir'], |
||
| 52 | true, |
||
| 53 | true |
||
| 54 | ); |
||
| 55 | } |
||
| 56 | |||
| 57 | return static::$serviceContainer; |
||
| 58 | } |
||
| 59 | } |
||
| 60 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.