Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
12 | public static function create(): Container |
||
13 | { |
||
14 | $tempDir = __DIR__ . '/temp/' . getmypid(); |
||
15 | |||
16 | if (! file_exists($tempDir . '/log')) { |
||
17 | mkdir($tempDir . '/log', 0777, true); |
||
18 | } |
||
19 | |||
20 | register_shutdown_function(function (): void { |
||
21 | FileSystem::delete(__DIR__ . '/temp'); |
||
22 | }); |
||
23 | |||
24 | $configurator = new Configurator(); |
||
|
|||
25 | $configurator->setTempDirectory($tempDir); |
||
26 | $configurator->addConfig(__DIR__ . '/config/config.neon'); |
||
27 | |||
28 | return $configurator->createContainer(); |
||
29 | } |
||
32 |