Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.2109 |
Changes | 0 |
1 | <?php |
||
43 | 3 | private function getPhpDbgBinLocation(): string |
|
44 | { |
||
45 | 3 | $checkInPath = new Process('phpdbg --version'); |
|
46 | 3 | $checkInPath->run(); |
|
47 | 3 | if ($checkInPath->getExitCode() === 0) { |
|
48 | 3 | return 'phpdbg'; |
|
49 | } |
||
50 | |||
51 | $locator = new Process('command -v phpdbg'); |
||
52 | $locator->run(); |
||
53 | |||
54 | return (string)preg_replace('/\s/', '', $locator->getOutput()); |
||
55 | } |
||
56 | } |
||
57 |