| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.3332 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 2 | public static function getPhpBinary(): string |
|
| 32 | { |
||
| 33 | 2 | $extensionSettings = GeneralUtility::makeInstance(ExtensionConfigurationProvider::class)->getExtensionConfiguration(); |
|
| 34 | |||
| 35 | 2 | if (empty($extensionSettings)) { |
|
| 36 | 1 | throw new \Exception('ExtensionSettings are empty'); |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | if (empty($extensionSettings['phpPath'])) { |
|
| 40 | 1 | $phpPath = CommandUtility::getCommand($extensionSettings['phpBinary']); |
|
| 41 | } else { |
||
| 42 | 1 | $phpPath = $extensionSettings['phpPath']; |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | return $phpPath; |
|
| 46 | } |
||
| 48 |