Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 2 | public function validate(IValidateFile $entry): void |
|
22 | { |
||
23 | 2 | $filename = $entry->getTempName(); |
|
24 | 2 | $finfo = new finfo(FILEINFO_MIME_TYPE); |
|
25 | 2 | if (!empty($filename) && ($finfo->file($filename) == $this->againstValue)) { |
|
26 | 1 | return; |
|
27 | } |
||
28 | 1 | throw new RuleException($this->errorText); |
|
29 | } |
||
31 |