CheckConnectionFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 7 1
1
<?php
2
3
namespace Abacaphiliac\DoctrineORMDiagnosticsModule;
4
5
use Doctrine\DBAL\Connection;
6
use Zend\ServiceManager\FactoryInterface;
7
use Zend\ServiceManager\ServiceLocatorInterface;
8
9
class CheckConnectionFactory implements FactoryInterface
10
{
11
    /**
12
     * Create service
13
     *
14
     * @param ServiceLocatorInterface $serviceLocator
15
     * @return CheckConnection
16
     * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException
17
     */
18 1
    public function createService(ServiceLocatorInterface $serviceLocator)
19
    {
20
        /** @var Connection $connection */
21 1
        $connection = $serviceLocator->get('doctrine.connection.orm_default');
22
        
23 1
        return new CheckConnection($connection);
24
    }
25
}
26