Total Complexity | 5 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | 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, new Filesystem($adapter, $aliases, $configParams)); |
||
22 | } |
||
23 | } |
||
24 | |||
25 | private function validateAdapter(string $alias, array $config) |
||
33 | } |
||
34 | } |
||
36 |
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