| Total Complexity | 5 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 4 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 10 | final class FileStorageServiceProvider extends ServiceProvider |
||
| 11 | { |
||
| 12 | public function register(Container $container): void |
||
| 13 | { |
||
| 14 | $factory = new Factory(); |
||
| 15 | $configs = $container->get(FileStorageConfigs::class)->getConfigs(); |
||
| 16 | foreach ($configs as $alias => $config) { |
||
| 17 | $this->validateAdapter($alias, $config); |
||
| 18 | $configParams = $config['config'] ?? []; |
||
| 19 | $aliases = $config['aliases'] ?? []; |
||
| 20 | $adapter = $factory->create($config['adapter']); |
||
| 21 | $container->set($alias, function () use ($adapter, $aliases, $configParams) { |
||
| 22 | return new Filesystem($adapter, $aliases, $configParams); |
||
| 23 | }); |
||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | private function validateAdapter(string $alias, array $config) |
||
| 35 | } |
||
| 36 | } |
||
| 38 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths