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