| 1 | <?php |
||
| 12 | abstract class Calculator |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @param ContainerCollection $containerCollection |
||
| 16 | * @param string $targetKey |
||
| 17 | * @param mixed $start |
||
| 18 | * @param mixed $end |
||
| 19 | */ |
||
| 20 | public function __construct(ContainerCollection $containerCollection, $targetKey, $start, $end) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param callable $func |
||
| 30 | * @return ContainerCollection |
||
| 31 | * @throws \Ayaml\AyamlSchemaNotSpecifiedException |
||
| 32 | */ |
||
| 33 | public function by(callable $func) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param $overwriteVal |
||
| 51 | * @return bool |
||
| 52 | */ |
||
| 53 | abstract public function isEnd($overwriteVal); |
||
| 54 | } |
||
| 55 |
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: