| 1 | <?php declare(strict_types = 1); |
||
| 8 | class ResultsLogic |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * ResultsLogic constructor. |
||
| 12 | * @param ResultsParser $parser Results Parser. |
||
| 13 | */ |
||
| 14 | public function __construct(ResultsParser $parser) |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Processes the results into a ResultCollection. |
||
| 21 | * @param Collection $completedProcesses Collection of completed processes. |
||
| 22 | * @param float $minScore Minimum score to show. |
||
| 23 | * @param integer $filesToShow Max number of files to show. |
||
| 24 | * @return mixed |
||
| 25 | */ |
||
| 26 | public function process(Collection $completedProcesses, float $minScore, int $filesToShow) |
||
| 33 | } |
||
| 34 |
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: