Code Duplication    Length = 7-7 lines in 2 locations

thumbs/phpthumb.class.php 2 locations

@@ 2058-2064 (lines=7) @@
2055
                                } else {
2056
                                    $this->DebugMessage('Skipping "-repage" because ImageMagick (v' . $this->ImageMagickVersion() . ') does not support it', __FILE__, __LINE__);
2057
                                }
2058
                                if ($IMuseExplicitImageOutputDimensions) {
2059
                                    if ($this->w && !$this->h) {
2060
                                        $this->h = ceil($this->w / ($this->source_width / $this->source_height));
2061
                                    } elseif ($this->h && !$this->w) {
2062
                                        $this->w = ceil($this->h * ($this->source_width / $this->source_height));
2063
                                    }
2064
                                }
2065
                                $commandline .= ' -' . $IMresizeParameter . ' ' . phpthumb_functions::escapeshellarg_replacement($this->w . 'x' . $this->h);
2066
                            }
2067
                        } else {
@@ 2079-2085 (lines=7) @@
2076
                                $this->h = ((($this->aoe || $this->far)
2077
                                             && $this->h) ? $this->h : ($this->h ? phpthumb_functions::nonempty_min($this->h, $getimagesize[1]) : ''));
2078
                                if ($this->w || $this->h) {
2079
                                    if ($IMuseExplicitImageOutputDimensions) {
2080
                                        if ($this->w && !$this->h) {
2081
                                            $this->h = ceil($this->w / ($this->source_width / $this->source_height));
2082
                                        } elseif ($this->h && !$this->w) {
2083
                                            $this->w = ceil($this->h * ($this->source_width / $this->source_height));
2084
                                        }
2085
                                    }
2086
                                    list($nw, $nh) = phpthumb_functions::TranslateWHbyAngle($this->w, $this->h, $this->ra);
2087
                                    $nw          = ((round($nw) != 0) ? round($nw) : '');
2088
                                    $nh          = ((round($nh) != 0) ? round($nh) : '');