Code Duplication    Length = 7-7 lines in 2 locations

src/HydratorContainer/FallbackHydratorContainer.php 1 location

@@ 54-60 (lines=7) @@
51
        }
52
53
        $interfaces = array_intersect(array_keys($this->interfaces), array_values(class_implements($class)));
54
        if($interfaces) {
55
            if(\count($interfaces) > 1) {
56
                throw new HydratorConflictException(sprintf('Class %s implements interfaces with colliding handlers!', $class));
57
            }
58
59
            return $this->interfaces[array_shift($interfaces)];
60
        }
61
62
        return null;
63
    }

src/NormalizerContainer/FallbackNormalizerContainer.php 1 location

@@ 55-61 (lines=7) @@
52
        }
53
54
        $interfaces = array_intersect(array_keys($this->interfaces), array_values(class_implements($class)));
55
        if($interfaces) {
56
            if(\count($interfaces) > 1) {
57
                throw new NormalizerConflictException(sprintf('Class %s implements interfaces with colliding handlers!', $class));
58
            }
59
60
            return $this->interfaces[array_shift($interfaces)];
61
        }
62
63
        return $this->default;
64
    }