@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | */ |
12 | 12 | public static function getBinaryVersion() |
13 | 13 | { |
14 | - if (method_exists(__CLASS__, 'makeBinary7z')) |
|
15 | - $binary = static::makeBinary7z(); |
|
16 | - else { |
|
14 | + if (method_exists(__CLASS__, 'makeBinary7z')) { |
|
15 | + $binary = static::makeBinary7z(); |
|
16 | + } else { |
|
17 | 17 | // some hack for gemorroj/archive7z 4.x version |
18 | 18 | $seven_zip = new self(null); |
19 | 19 | $binary = $seven_zip->getAutoCli(); |
@@ -22,8 +22,9 @@ discard block |
||
22 | 22 | |
23 | 23 | $process = new Process([str_replace('\\', '/', $binary)]); |
24 | 24 | $result = $process->mustRun()->getOutput(); |
25 | - if (!preg_match('~7-Zip (\[[\d]+\] )?(?<version>\d+\.\d+)~i', $result, $version)) |
|
26 | - return false; |
|
25 | + if (!preg_match('~7-Zip (\[[\d]+\] )?(?<version>\d+\.\d+)~i', $result, $version)) { |
|
26 | + return false; |
|
27 | + } |
|
27 | 28 | |
28 | 29 | return $version['version']; |
29 | 30 | } |