| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 100 | public function getPhpBinary(): string |
||
| 101 | { |
||
| 102 | $path = $this->binary; |
||
|
|
|||
| 103 | if (!defined('PHP_WINDOWS_VERSION_BUILD')) { |
||
| 104 | $path = escapeshellarg($path); |
||
| 105 | } |
||
| 106 | |||
| 107 | $args = $this->binaryArgs; |
||
| 108 | if (is_array($args)) { |
||
| 109 | $args = implode(' ', $args); |
||
| 110 | } |
||
| 111 | |||
| 112 | return trim($path . ' ' . $args); |
||
| 113 | } |
||
| 114 | } |
||
| 115 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: