Code Duplication    Length = 5-5 lines in 2 locations

class/Common/Resizer.php 2 locations

@@ 70-74 (lines=5) @@
67
            if ($width > $height) {
68
                if ($width < $this->maxWidth) {
69
                    $new_width = $width;
70
                } else {
71
                    $new_width  = $this->maxWidth;
72
                    $divisor    = $width / $new_width;
73
                    $new_height = floor($height / $divisor);
74
                }
75
            } elseif ($height < $this->maxHeight) {
76
                $new_height = $height;
77
            } else {
@@ 77-81 (lines=5) @@
74
                }
75
            } elseif ($height < $this->maxHeight) {
76
                $new_height = $height;
77
            } else {
78
                $new_height = $this->maxHeight;
79
                $divisor    = $height / $new_height;
80
                $new_width  = floor($width / $divisor);
81
            }
82
83
            // Create a new temporary image.
84
            $tmpimg = imagecreatetruecolor($new_width, $new_height);