Code Duplication    Length = 7-7 lines in 2 locations

src/DoctrineORMDiagnosticsModule/AbstractCheckCommandFactory.php 2 locations

@@ 27-33 (lines=7) @@
24
    public function createService(ServiceLocatorInterface $serviceLocator)
25
    {
26
        $cli = $serviceLocator->get('doctrine.cli');
27
        if (!$cli instanceof Application) {
28
            throw new \UnexpectedValueException(sprintf(
29
                'Expected type [%s]. Actual type [%s].',
30
                Application::class,
31
                is_object($cli) ? get_class($cli) : gettype($cli)
32
            ));
33
        }
34
35
        $command = $serviceLocator->get($this->getCommandServiceName());
36
        if (!$command instanceof Command) {
@@ 36-42 (lines=7) @@
33
        }
34
35
        $command = $serviceLocator->get($this->getCommandServiceName());
36
        if (!$command instanceof Command) {
37
            throw new \UnexpectedValueException(sprintf(
38
                'Expected type [%s]. Actual type [%s].',
39
                Command::class,
40
                is_object($command) ? get_class($command) : gettype($command)
41
            ));
42
        }
43
        
44
        $input = new RequestInput(new Request(array()));
45