CheckSchemaFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 5
dl 0
loc 22
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 11 1
1
<?php
2
3
namespace Abacaphiliac\DoctrineORMDiagnosticsModule;
4
5
use Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand;
6
use DoctrineModule\Component\Console\Input\RequestInput;
7
use DoctrineModule\Component\Console\Output\PropertyOutput;
8
use Zend\Console\Request;
9
use Zend\ServiceManager\FactoryInterface;
10
use Zend\ServiceManager\ServiceLocatorInterface;
11
12
class CheckSchemaFactory implements FactoryInterface
13
{
14
    /**
15
     * Create service
16
     *
17
     * @param ServiceLocatorInterface $serviceLocator
18
     * @return CheckCommand
19
     * @throws \Zend\Console\Exception\RuntimeException
20
     * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException
21
     */
22 1
    public function createService(ServiceLocatorInterface $serviceLocator)
23
    {
24
        /** @var ValidateSchemaCommand $command */
25 1
        $command = $serviceLocator->get('doctrine.orm_cmd.validate_schema');
26
        
27 1
        $input = new RequestInput(new Request(array()));
28
        
29 1
        $output = new PropertyOutput();
30
        
31 1
        return new CheckCommand($command, $input, $output);
32
    }
33
}
34