| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Image extends File |
||
| 9 | { |
||
| 10 | public static $validExtensions = ['jpg', 'jpeg', 'gif', 'png']; |
||
| 11 | |||
| 12 | const SIZE_WIDTH_INDEX = 0; |
||
| 13 | const SIZE_HEIGHT_INDEX = 1; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Retorna a largura da imagem |
||
| 17 | * @return int|null |
||
| 18 | */ |
||
| 19 | public function getWidth() |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Retorna a altura da imagem |
||
| 26 | * @return int|null |
||
| 27 | */ |
||
| 28 | public function getHeight() |
||
| 29 | { |
||
| 30 | return $this->getImageSize(static::SIZE_HEIGHT_INDEX); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param int $param |
||
| 35 | * @return int|null |
||
| 36 | */ |
||
| 37 | protected function getImageSize($param) |
||
| 45 | } |
||
| 46 | } |
||
| 47 |