Code Duplication    Length = 11-11 lines in 2 locations

thumbs/phpthumb.class.php 2 locations

@@ 2167-2177 (lines=11) @@
2164
                            }
2165
                            break;
2166
2167
                        case 'ds':
2168
                            if ($this->ImageMagickSwitchAvailable(array('colorspace', 'modulate'))) {
2169
                                if ($parameter == 100) {
2170
                                    $commandline .= ' -colorspace GRAY';
2171
                                    $commandline .= ' -modulate 100,0,100';
2172
                                } else {
2173
                                    $commandline .= ' -modulate ' . phpthumb_functions::escapeshellarg_replacement('100,' . (100 - (int)$parameter) . ',100');
2174
                                }
2175
                                $successfullyProcessedFilters[] = $filterkey;
2176
                            }
2177
                            break;
2178
2179
                        case 'sat':
2180
                            if ($this->ImageMagickSwitchAvailable(array('colorspace', 'modulate'))) {
@@ 2179-2189 (lines=11) @@
2176
                            }
2177
                            break;
2178
2179
                        case 'sat':
2180
                            if ($this->ImageMagickSwitchAvailable(array('colorspace', 'modulate'))) {
2181
                                if ($parameter == -100) {
2182
                                    $commandline .= ' -colorspace GRAY';
2183
                                    $commandline .= ' -modulate 100,0,100';
2184
                                } else {
2185
                                    $commandline .= ' -modulate ' . phpthumb_functions::escapeshellarg_replacement('100,' . (100 + (int)$parameter) . ',100');
2186
                                }
2187
                                $successfullyProcessedFilters[] = $filterkey;
2188
                            }
2189
                            break;
2190
2191
                        case 'gray':
2192
                            if ($this->ImageMagickSwitchAvailable(array('colorspace', 'modulate'))) {