| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class ConfigServiceProvider implements ServiceProviderInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @param \Pimple\Container $pimple |
||
| 14 | * |
||
| 15 | * @return void |
||
| 16 | */ |
||
| 17 | public function register(Container $pimple): void |
||
| 18 | { |
||
| 19 | $self = $this; |
||
| 20 | |||
| 21 | $pimple->offsetSet('config', static function (Container $container) use ($self) { |
||
| 22 | return $self->createConfig($container); |
||
| 23 | }); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param \Pimple\Container $container |
||
| 28 | * |
||
| 29 | * @return \Jellyfish\Config\ConfigInterface |
||
| 30 | * |
||
| 31 | * @throws \Exception |
||
| 32 | */ |
||
| 33 | protected function createConfig(Container $container): ConfigInterface |
||
| 39 | } |
||
| 40 | } |
||
| 41 |