Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0116 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | 1 | public static function getBinaryVersion() |
|
13 | { |
||
14 | 1 | $binary = static::makeBinary7z(); |
|
15 | 1 | $process = new Process(escapeshellarg(str_replace('\\', '/', $binary))); |
|
|
|||
16 | 1 | $result = $process->mustRun()->getOutput(); |
|
17 | 1 | if (!preg_match('~7-Zip (\d+\.\d+)~i', $result, $version)) |
|
18 | 1 | return false; |
|
19 | |||
20 | return $version[1]; |
||
21 | } |
||
22 | } |