| 1 | <?php declare(strict_types=1); |
||
| 27 | abstract class TVItem extends Item |
||
| 28 | { |
||
| 29 | use ElementTrait; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Get posters params configuration from child object |
||
| 33 | * @return \stdClass |
||
| 34 | */ |
||
| 35 | 2 | protected function getPostersParams() : \stdClass |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Image posters |
||
| 54 | * @return \Generator|Results\Image |
||
| 55 | */ |
||
| 56 | 2 | public function getPosters() : \Generator |
|
| 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: