Conditions | 7 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 7 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 6 | public function validate(IValidateFile $entry): void |
|
22 | { |
||
23 | 6 | $filename = $entry->getTempName(); |
|
24 | 6 | if (!empty($filename)) { |
|
25 | 6 | $imageSize = @getimagesize($filename); |
|
26 | 6 | if (false !== $imageSize) { |
|
27 | if ( |
||
28 | 6 | (0 === $this->againstValue[0] || $imageSize[0] >= $this->againstValue[0]) |
|
29 | 6 | && (0 === $this->againstValue[1] || $imageSize[1] >= $this->againstValue[1]) |
|
30 | ) { |
||
31 | 3 | return; |
|
32 | } |
||
33 | } |
||
34 | } |
||
35 | |||
36 | 3 | throw new RuleException($this->errorText); |
|
37 | } |
||
52 |