Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
41 | protected function validateFileContent() |
||
42 | { |
||
43 | $fileInfo = finfo_open(FILEINFO_MIME_TYPE); |
||
44 | $rawInfo = finfo_file($fileInfo, $this->getFileLocation()->getValue()); |
||
45 | if ($rawInfo !== $this->allowedMimeType) { |
||
46 | throw new InvalidFileTypeException($this->getFileContentErrorMessage($rawInfo), 102); |
||
47 | } |
||
48 | } |
||
49 | |||
63 | } |