| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null): FilesystemManager |
||
| 34 | { |
||
| 35 | $config = $container->get('config'); |
||
| 36 | $config = $config['bsb_flysystem']['filesystems']; |
||
| 37 | $serviceConfig = []; |
||
| 38 | foreach ($config as $key => $filesystems) { |
||
| 39 | $serviceConfig['factories'][$key] = FilesystemFactory::class; |
||
| 40 | $serviceConfig['shared'][$key] = isset($filesystems['shared']) ? (bool) $filesystems['shared'] : true; |
||
| 41 | } |
||
| 42 | |||
| 43 | return new FilesystemManager($container, $serviceConfig); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |