Module   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 77.78%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 12
c 2
b 0
f 0
dl 0
loc 32
ccs 7
cts 9
cp 0.7778
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getModuleDependencies() 0 3 1
A init() 0 8 1
A getConfig() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Fabiang\DoctrineDynamic;
6
7
use Laminas\ModuleManager\Feature\ConfigProviderInterface;
8
use Laminas\ModuleManager\Feature\DependencyIndicatorInterface;
9
use Laminas\ModuleManager\Feature\InitProviderInterface;
10
use Laminas\ModuleManager\ModuleManagerInterface;
11
use Laminas\Mvc\Application;
12
use Laminas\Mvc\MvcEvent;
13
14
final class Module implements
15
    ConfigProviderInterface,
16
    DependencyIndicatorInterface,
17
    InitProviderInterface
18
{
19
    /**
20
     * {@inheritDoc}
21
     */
22 1
    public function getConfig(): iterable
23
    {
24 1
        return require __DIR__ . '/../config/module.config.php';
25
    }
26
27
    /**
28
     * {@inheritDoc}
29
     */
30
    public function getModuleDependencies(): array
31
    {
32
        return ['DoctrineORMModule'];
33
    }
34
35
    /**
36
     * {@inheritDoc}
37
     */
38 1
    public function init(ModuleManagerInterface $manager): void
39
    {
40 1
        $sharedEventManager = $manager->getEventManager()->getSharedManager();
41 1
        $listener           = new Listener\RegisterProxyDriverListener();
42 1
        $sharedEventManager->attach(
43
            Application::class,
44
            MvcEvent::EVENT_BOOTSTRAP,
45 1
            [$listener, 'onBootstrap']
46
        );
47
    }
48
}
49