Code Duplication    Length = 10-10 lines in 2 locations

src/Charcoal/Image/Effect/AbstractResizeEffect.php 2 locations

@@ 393-402 (lines=10) @@
390
        $imageHeight = $this->image()->height();
391
392
        switch ($mode) {
393
            case 'exact':
394
                if (($this->width() <= 0) || ($this->height() <= 0)) {
395
                    throw new Exception(
396
                        'Missing parameters to perform exact resize'
397
                    );
398
                }
399
                if ($imageWidth != $this->width() || $imageHeight != $this->height()) {
400
                    $this->doResize($this->width(), $this->height(), false);
401
                }
402
                break;
403
404
            case 'width':
405
                if ($this->width() <= 0) {
@@ 426-435 (lines=10) @@
423
                }
424
                break;
425
426
            case 'best_fit':
427
                if (($this->width() <= 0) || ($this->height() <= 0)) {
428
                    throw new Exception(
429
                        'Missing parameters to perform "best fit" resize'
430
                    );
431
                }
432
                if ($imageWidth != $this->width() || $imageHeight != $this->height()) {
433
                    $this->doResize($this->width(), $this->height(), true);
434
                }
435
                break;
436
437
            case 'constraints':
438
                $minW = $this->minWidth();