1 | <?php declare(strict_types = 1); |
||
14 | class ChurnCommand extends Command |
||
15 | { |
||
16 | /** |
||
17 | * Class constructor. |
||
18 | */ |
||
19 | public function __construct() |
||
25 | |||
26 | /** |
||
27 | * Configure the command |
||
28 | * @return void |
||
29 | */ |
||
30 | protected function configure() |
||
37 | |||
38 | /** |
||
39 | * Exectute the command |
||
40 | * @param InputInterface $input Input. |
||
41 | * @param OutputInterface $output Output. |
||
42 | * @return void |
||
43 | */ |
||
44 | protected function execute(InputInterface $input, OutputInterface $output) |
||
51 | |||
52 | /** |
||
53 | * Displays the results in a table. |
||
54 | * @param OutputInterface $output Output. |
||
55 | * @param Churn\Results\ResultCollection $results Results Collection. |
||
56 | * @return void |
||
57 | */ |
||
58 | protected function displayResults(OutputInterface $output, ResultCollection $results) |
||
67 | } |
||
68 |
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: