Code Duplication    Length = 11-11 lines in 2 locations

src/Gmagick/Image.php 1 location

@@ 91-101 (lines=11) @@
88
    /**
89
     * {@inheritdoc}
90
     */
91
    public function withFormat($format)
92
    {
93
        if (!in_array($format, static::$supportedFormats)) {
94
            throw new RuntimeException('Unsupported image format');
95
        }
96
97
        $image = clone $this;
98
        $image->gmagick->setimageformat($format);
99
100
        return $image;
101
    }
102
103
    /**
104
     * {@inheritdoc}

src/Imagick/Image.php 1 location

@@ 91-101 (lines=11) @@
88
    /**
89
     * {@inheritdoc}
90
     */
91
    public function withFormat($format)
92
    {
93
        if (!in_array($format, static::$supportedFormats)) {
94
            throw new RuntimeException('Unsupported image format');
95
        }
96
97
        $image = clone $this;
98
        $image->imagick->setImageFormat($format);
99
100
        return $image;
101
    }
102
103
    /**
104
     * {@inheritdoc}