| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 42 | 42 | public function check($path) |
|
| 43 | { |
||
| 44 | 42 | $extension = File::extension($path); |
|
| 45 | |||
| 46 | 42 | if (!in_array($extension, $this->extensions)) { |
|
| 47 | 21 | throw new InvalidFileTypeException( |
|
| 48 | 21 | sprintf('%s is an invalid file type for the %s class', $extension, get_class($this))); |
|
| 49 | } |
||
| 50 | |||
| 51 | 21 | return true; |
|
| 52 | } |
||
| 53 | |||
| 84 |