Code Duplication    Length = 11-11 lines in 2 locations

src/HydratorContainer/FallbackHydratorContainer.php 1 location

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

src/NormalizerContainer/FallbackNormalizerContainer.php 1 location

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