| 1 | <?php |
||
| 13 | class Parser |
||
| 14 | { |
||
| 15 | |||
| 16 | |||
| 17 | /** |
||
| 18 | * @param string $composerBinPath |
||
| 19 | */ |
||
| 20 | public function __construct($composerBinPath) |
||
| 24 | |||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * @param Candidate $candidate |
||
| 29 | * @return array |
||
| 30 | */ |
||
| 31 | public function execute(Candidate $candidate) |
||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | private function getCommandString() |
||
| 59 | } |
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: