1 | <?php |
||
14 | class DatetimeCalculator extends Calculator |
||
15 | { |
||
16 | /** |
||
17 | * @param $overwriteVal |
||
18 | * @return bool |
||
19 | * @throws \Exception |
||
20 | */ |
||
21 | public function isEnd($overwriteVal) |
||
25 | |||
26 | /** |
||
27 | * @param callable $func |
||
28 | * @param null $format |
||
29 | * @return \Ayaml\ContainerCollection |
||
30 | */ |
||
31 | public function by(callable $func, $format = null) |
||
45 | } |
||
46 |
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: