| Conditions | 4 | 
| Paths | 3 | 
| Total Lines | 12 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 8 | 
| CRAP Score | 4 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 72 | 13 | private function validateFile()  | 
            |
| 73 |     { | 
            ||
| 74 | 13 |         if (!ExtensionChecker::check($this->path, ['jpg', 'png'])) { | 
            |
| 75 | 1 | throw new \InvalidArgumentException(  | 
            |
| 76 | 1 |                 sprintf('"%s" this file has not an allowed extension. Only "png" and "jpg" image are supported', $this->path) | 
            |
| 77 | 1 | );  | 
            |
| 78 | }  | 
            ||
| 79 | |||
| 80 | 12 |         if (!$this->isRemoteFile() && !is_readable($this->path)) { | 
            |
| 81 | 1 |             throw new \InvalidArgumentException(sprintf('The file "%s" should be readable', $this->path)); | 
            |
| 82 | }  | 
            ||
| 83 | 11 | }  | 
            |
| 84 | }  | 
            ||
| 85 |