Code Duplication    Length = 4-6 lines in 2 locations

htdocs/class/libraries/vendor/smottt/wideimage/lib/WideImage/Operation/Resize.php 2 locations

@@ 62-67 (lines=6) @@
59
			$rx = null;
60
		}
61
		
62
		if ($height !== null) {
63
			$height = Coordinate::fix($height, $img->getHeight());
64
			$ry     = $img->getHeight() / $height;
65
		} else {
66
			$ry = null;
67
		}
68
		
69
		if ($rx === null && $ry !== null) {
70
			$rx    = $ry;
@@ 74-77 (lines=4) @@
71
			$width = round($img->getWidth() / $rx);
72
		}
73
		
74
		if ($ry === null && $rx !== null) {
75
			$ry     = $rx;
76
			$height = round($img->getHeight() / $ry);
77
		}
78
		
79
		if ($width === 0 || $height === 0) {
80
			return array('width' => 0, 'height' => 0);