Code Duplication    Length = 8-10 lines in 2 locations

src/Image/Image.php 2 locations

@@ 762-769 (lines=8) @@
759
            $this->setExtension(pathinfo($image, PATHINFO_EXTENSION));
760
        }
761
762
        if ($image instanceof FileInterface) {
763
764
            /* @var FileInterface $image */
765
            $this->setExtension($image->getExtension());
766
767
            $this->setWidth($image->getWidth());
768
            $this->setHeight($image->getHeight());
769
        }
770
771
        if ($image instanceof FilePresenter) {
772
@@ 771-780 (lines=10) @@
768
            $this->setHeight($image->getHeight());
769
        }
770
771
        if ($image instanceof FilePresenter) {
772
773
            /* @var FilePresenter|FileInterface $image */
774
            $image = $image->getObject();
775
776
            $this->setExtension($image->getExtension());
777
778
            $this->setWidth($image->getWidth());
779
            $this->setHeight($image->getHeight());
780
        }
781
782
        $this->image = $image;
783