Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
52 | 1040 | protected function getBinaryPath($binary) { |
|
53 | 1040 | if (!isset($this->paths[$binary])) { |
|
54 | 1040 | $result = null; |
|
55 | 1040 | $output = []; |
|
56 | 1040 | exec("which $binary 2>&1", $output, $result); |
|
57 | 1040 | $this->paths[$binary] = $result === 0 ? trim(implode('', $output)) : false; |
|
58 | 260 | } |
|
59 | 1040 | return $this->paths[$binary]; |
|
60 | } |
||
61 | } |
||
62 |