| Conditions | 4 |
| Paths | 4 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function validate() |
||
| 15 | { |
||
| 16 | if (!$this->isValidSize()) { |
||
| 17 | $this->errors[] = 'The file is too large'; |
||
| 18 | return false; |
||
| 19 | } |
||
| 20 | |||
| 21 | if (!$this->isValidExtension()) { |
||
| 22 | $this->errors[] = 'The file does not have a valid extension'; |
||
| 23 | return false; |
||
| 24 | } |
||
| 25 | |||
| 26 | if (!$this->isValidImage()) { |
||
| 27 | $this->errors[] = 'The file does not appear to be an image'; |
||
| 28 | return false; |
||
| 29 | } |
||
| 30 | |||
| 31 | return true; |
||
| 32 | } |
||
| 33 | |||
| 45 |