| 1 | <?php |
||
| 9 | class TVSeason extends Results implements TVSeasonResultsInterface |
||
| 10 | { |
||
| 11 | |||
| 12 | protected $episode_count = 0; |
||
| 13 | protected $season_number = 0; |
||
| 14 | protected $poster_path = null; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Constructor |
||
| 18 | * @param \vfalies\tmdb\Tmdb $tmdb |
||
| 19 | * @param \stdClass $result |
||
| 20 | * @throws \Exception |
||
| 21 | */ |
||
| 22 | 5 | public function __construct(Tmdb $tmdb, \stdClass $result) |
|
| 33 | |||
| 34 | 1 | public function getId(): int |
|
| 38 | |||
| 39 | 1 | public function getReleaseDate(): string |
|
| 43 | |||
| 44 | 1 | public function getEpisodeCount(): int |
|
| 48 | |||
| 49 | 1 | public function getSeasonNumber(): int |
|
| 53 | } |
||
| 54 |
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: