Code Duplication    Length = 11-11 lines in 3 locations

src/CImage/CImage.php 3 locations

@@ 2439-2449 (lines=11) @@
2436
                imagejpeg($this->image, $this->cacheFileName, $this->quality);
2437
2438
                // Use JPEG optimize if defined
2439
                if ($this->jpegOptimizeCmd) {
2440
                    if ($this->verbose) {
2441
                        clearstatcache();
2442
                        $this->log("Filesize before optimize: " . filesize($this->cacheFileName) . " bytes.");
2443
                    }
2444
                    $res = array();
2445
                    $cmd = $this->jpegOptimizeCmd . " -outfile $this->cacheFileName $this->cacheFileName";
2446
                    exec($cmd, $res);
2447
                    $this->log($cmd);
2448
                    $this->log($res);
2449
                }
2450
                break;
2451
2452
            case 'gif':
@@ 2490-2500 (lines=11) @@
2487
                }
2488
2489
                // Use external program to filter PNG, if defined
2490
                if ($this->pngFilterCmd) {
2491
                    if ($this->verbose) {
2492
                        clearstatcache();
2493
                        $this->Log("Filesize before filter optimize: " . filesize($this->cacheFileName) . " bytes.");
2494
                    }
2495
                    $res = array();
2496
                    $cmd = $this->pngFilterCmd . " $this->cacheFileName";
2497
                    exec($cmd, $res);
2498
                    $this->Log($cmd);
2499
                    $this->Log($res);
2500
                }
2501
2502
                // Use external program to deflate PNG, if defined
2503
                if ($this->pngDeflateCmd) {
@@ 2503-2513 (lines=11) @@
2500
                }
2501
2502
                // Use external program to deflate PNG, if defined
2503
                if ($this->pngDeflateCmd) {
2504
                    if ($this->verbose) {
2505
                        clearstatcache();
2506
                        $this->Log("Filesize before deflate optimize: " . filesize($this->cacheFileName) . " bytes.");
2507
                    }
2508
                    $res = array();
2509
                    $cmd = $this->pngDeflateCmd . " $this->cacheFileName";
2510
                    exec($cmd, $res);
2511
                    $this->Log($cmd);
2512
                    $this->Log($res);
2513
                }
2514
                break;
2515
        }
2516