Code Duplication    Length = 8-8 lines in 2 locations

src/MaglMarkdown/Cache/CacheListenerFactory.php 1 location

@@ 53-60 (lines=8) @@
50
     * @param ServiceLocatorInterface|ContainerInterface $container
51
     * @return CacheListener
52
     */
53
    protected function create($container)
54
    {
55
        if (!$container instanceof ServiceLocatorInterface && !$container instanceof ContainerInterface) {
56
            throw new \InvalidArgumentException('Invalid container to create service');
57
        }
58
59
        return new CacheListener($container->get('MaglMarkdown\Cache'));
60
    }
61
}
62

src/MaglMarkdown/View/Helper/MarkdownFactory.php 1 location

@@ 58-65 (lines=8) @@
55
     * @param ServiceLocatorInterface|ContainerInterface $container
56
     * @return Markdown
57
     */
58
    protected function create($container)
59
    {
60
        if (!$container instanceof ServiceLocatorInterface && !$container instanceof ContainerInterface) {
61
            throw new \InvalidArgumentException('Invalid container to create service');
62
        }
63
64
        return new Markdown($container->get('MaglMarkdown\MarkdownService'));
65
    }
66
}
67