Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function handle($path, $remoteUrl, array $options = []) |
||
29 | { |
||
30 | //Get file from remote url |
||
31 | $contents = $this->filesystem |
||
32 | ->getAdapter() |
||
33 | ->getHttpClient() |
||
34 | ->get($remoteUrl) |
||
35 | ->getBody() |
||
36 | ->getContents(); |
||
37 | |||
38 | $filename = md5($contents); |
||
39 | $extension = ExtensionGuesser::getInstance()->guess(MimeType::detectByContent($contents)); |
||
40 | $name = $filename.'.'.$extension; |
||
41 | |||
42 | $path = trim($path.'/'.$name, '/'); |
||
43 | |||
44 | return $this->filesystem->put($path, $contents, $options) ? $path : false; |
||
45 | } |
||
47 |
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