Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function __invoke(ContainerInterface $container): ReactHttpServer |
||
20 | { |
||
21 | $config = $container->get('config')['react_http_server']; |
||
22 | |||
23 | Assert::keyExists($config, 'uri'); |
||
24 | foreach (self::REQUIRED_FILE_PATH_CONFIGS as $filePathConfig) { |
||
25 | Assert::keyExists($config, $filePathConfig); |
||
26 | Assert::fileExists($config[$filePathConfig]); |
||
27 | } |
||
28 | |||
29 | return new ReactHttpServer($config); |
||
30 | } |
||
32 |