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