Code Duplication    Length = 6-6 lines in 2 locations

src/Charcoal/Image/Imagemagick/ImagemagickImage.php 2 locations

@@ 205-210 (lines=6) @@
202
     */
203
    protected function findCmd($cmdName)
204
    {
205
        if (!is_string($cmdName)) {
206
            throw new InvalidArgumentException(sprintf(
207
                'Target image must be a string, received %s',
208
                (is_object($cmdName) ? get_class($cmdName) : gettype($cmdName))
209
            ));
210
        }
211
212
        if (!in_array($cmdName, $this->availableCommands())) {
213
            if (!is_string($cmdName)) {
@@ 263-268 (lines=6) @@
260
     */
261
    public function cmd($name)
262
    {
263
        if (!is_string($cmdName)) {
264
            throw new InvalidArgumentException(sprintf(
265
                'Target image must be a string, received %s',
266
                (is_object($cmdName) ? get_class($cmdName) : gettype($cmdName))
267
            ));
268
        }
269
270
        switch ($name) {
271
            case 'mogrify':