Code Duplication    Length = 11-11 lines in 2 locations

src/HydratorContainer/FallbackHydratorContainer.php 1 location

@@ 30-40 (lines=11) @@
27
        }
28
    }
29
30
    public function addAlias($alias, $class)
31
    {
32
        $handler = $this->getHandler($class);
33
34
        if(null === $handler) {
35
            throw new HydratorNotFoundException(sprintf('Handler for class %s does not exist!', $class));
36
        }
37
38
        $this->handlers[$alias] = $handler;
39
        $this->aliases[$alias] = $this->aliases[$class];
40
    }
41
42
    public function getHandler($class)
43
    {

src/NormalizerContainer/FallbackNormalizerContainer.php 1 location

@@ 31-41 (lines=11) @@
28
        }
29
    }
30
31
    public function addAlias($alias, $class)
32
    {
33
        $handler = $this->getHandler($class);
34
35
        if(null === $handler) {
36
            throw new NormalizerNotFoundException(sprintf('Handler for class %s does not exist!', $class));
37
        }
38
39
        $this->handlers[$alias] = $handler;
40
        $this->aliases[$alias] = $this->aliases[$class];
41
    }
42
43
    public function getHandler($class)
44
    {