| 1 | <?php  | 
            ||
| 8 | class Image extends Results  | 
            ||
| 9 | { | 
            ||
| 10 | |||
| 11 | protected $aspect_ratio;  | 
            ||
| 12 | protected $file_path;  | 
            ||
| 13 | protected $height;  | 
            ||
| 14 | protected $iso_639_1;  | 
            ||
| 15 | protected $vote_average;  | 
            ||
| 16 | protected $vote_count;  | 
            ||
| 17 | protected $width;  | 
            ||
| 18 | |||
| 19 | 18 | public function __construct(Tmdb $tmdb, $id, \stdClass $result)  | 
            |
| 32 | |||
| 33 | 1 | public function getId()  | 
            |
| 37 | |||
| 38 | 1 | public function getAspectRatio()  | 
            |
| 42 | |||
| 43 | 1 | public function getFilePath()  | 
            |
| 47 | |||
| 48 | 1 | public function getHeight()  | 
            |
| 52 | |||
| 53 | 1 | public function getIso6391()  | 
            |
| 57 | |||
| 58 | 1 | public function getVoteAverage()  | 
            |
| 62 | |||
| 63 | 1 | public function getVoteCount()  | 
            |
| 67 | |||
| 68 | 1 | public function getWidth()  | 
            |
| 72 | |||
| 73 | }  | 
            ||
| 74 | 
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: