| Conditions | 2 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.686 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 54 | public function register(DiInterface $container) |
|
| 17 | { |
||
| 18 | 54 | $config = $container->getShared('config'); |
|
| 19 | |||
| 20 | 54 | $container->setShared( |
|
| 21 | 54 | 'filesystem', |
|
| 22 | function ($filesystem = 'local') use ($config) { |
||
| 23 | if ($filesystem === 'local') { |
||
| 24 | //create directory |
||
| 25 | $adapter = new Local($config->filesystem->local->path); |
||
| 26 | } else { |
||
| 27 | //s3 |
||
| 28 | $client = S3Client::factory($config->filesystem->s3->info->toArray()); |
||
|
|
|||
| 29 | $adapter = new AwsS3Adapter($client, $config->filesystem->s3->bucket, null, ['ACL' => 'public-read']); |
||
| 30 | } |
||
| 31 | return new Filesystem($adapter); |
||
| 32 | 54 | } |
|
| 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