| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 3 | public function __invoke(ContainerInterface $container): ToggleConfig |
|
| 15 | { |
||
| 16 | /** @var array<string, mixed>|mixed $config */ |
||
| 17 | 3 | $config = $container->get('config'); |
|
| 18 | 3 | Assert::isArray($config); |
|
| 19 | 3 | Assert::keyExists($config, 'pheature_flags', self::MISSING_CONFIG); |
|
| 20 | 2 | Assert::isArray($config['pheature_flags'], self::MISSING_CONFIG); |
|
| 21 | |||
| 22 | /** @var array<string, mixed> $pheatureConfig */ |
||
| 23 | 2 | $pheatureConfig = $config['pheature_flags']; |
|
| 24 | |||
| 25 | 2 | return new ToggleConfig($pheatureConfig); |
|
| 26 | } |
||
| 28 |