Conditions | 4 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | protected function extractWidthHeight($value) |
||
26 | { |
||
27 | $size = @getimagesize($this->formatValue($value)); |
||
28 | |||
29 | if (empty($size) || ($size[0] === 0) || ($size[1] === 0)) { |
||
30 | throw new ValidationException('Unable to determine size.'); |
||
31 | } |
||
32 | |||
33 | return array( |
||
34 | 'width' => $size[0], |
||
35 | 'height' => $size[1] |
||
36 | ); |
||
37 | } |
||
38 | } |
||
39 |