Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.4326 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | 1 | public static function getBinaryVersion() |
|
13 | { |
||
14 | 1 | if (method_exists(__CLASS__, 'makeBinary7z')) |
|
15 | 1 | $binary = static::makeBinary7z(); |
|
16 | else { |
||
17 | // some hack for gemorroj/archive7z 4.x version |
||
18 | $seven_zip = new self(null); |
||
19 | $binary = $seven_zip->getAutoCli(); |
||
20 | unset($seven_zip); |
||
21 | } |
||
22 | |||
23 | 1 | $process = new Process([str_replace('\\', '/', $binary)]); |
|
24 | 1 | $result = $process->mustRun()->getOutput(); |
|
25 | 1 | if (!preg_match('~7-Zip (\[[\d]+\] )?(?<version>\d+\.\d+)~i', $result, $version)) |
|
26 | return false; |
||
27 | |||
28 | 1 | return $version['version']; |
|
29 | } |
||
30 | } |
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