| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null): FilesystemManager |
||
| 19 | { |
||
| 20 | $config = $container->get('config'); |
||
| 21 | $config = $config['bsb_flysystem']['filesystems']; |
||
| 22 | $serviceConfig = []; |
||
| 23 | foreach ($config as $key => $filesystems) { |
||
| 24 | $serviceConfig['factories'][$key] = FilesystemFactory::class; |
||
| 25 | $serviceConfig['shared'][$key] = isset($filesystems['shared']) ? (bool) $filesystems['shared'] : true; |
||
| 26 | } |
||
| 27 | |||
| 28 | return new FilesystemManager($container, $serviceConfig); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |