Code Duplication    Length = 5-5 lines in 2 locations

src/Metable/Attribute.php 2 locations

@@ 284-288 (lines=5) @@
281
     */
282
    protected function getMutatedType($value, $dir = 'setter')
283
    {
284
        foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) {
285
            if ($this->getValueType($value) == $mutated || $value instanceof $mutated) {
286
                return $mutated;
287
            }
288
        }
289
    }
290
291
    /**
@@ 314-318 (lines=5) @@
311
    {
312
        $type = $type ?: $this->getValueType($value);
313
314
        foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) {
315
            if ($type == $mutated || $value instanceof $mutated) {
316
                return $mutator;
317
            }
318
        }
319
    }
320
321
    /**