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