Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function getValue(): string |
||
14 | { |
||
15 | if (null === $this->value) { |
||
16 | $phpBin = (new PhpExecutableFinder())->find(); |
||
17 | if (false === $phpBin) { |
||
18 | throw new \RuntimeException('A PHP binary could not be found'); // todo better exception |
||
19 | } |
||
20 | |||
21 | $this->value = $phpBin; |
||
22 | } |
||
23 | |||
24 | return $this->value; |
||
25 | } |
||
27 |