Module   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 35
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A onBootstrap() 0 6 2
A getConfig() 0 4 1
A getAutoloaderConfig() 0 10 1
1
<?php
2
3
/**
4
 * @author Matthias Glaub <[email protected]>
5
 * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
 */
7
8
namespace MaglLegacyApplication;
9
10
use Laminas\EventManager\EventInterface;
11
use Laminas\ModuleManager\Feature\AutoloaderProviderInterface;
12
use Laminas\ModuleManager\Feature\BootstrapListenerInterface;
13
use Laminas\ModuleManager\Feature\ConfigProviderInterface;
14
use Laminas\Mvc\MvcEvent;
15
use MaglLegacyApplication\Application\MaglLegacy;
16
17
class Module implements BootstrapListenerInterface, ConfigProviderInterface, AutoloaderProviderInterface
18
{
19
20
    /**
21
     * @inheritDoc
22
     */
23 7
    public function onBootstrap(EventInterface $event)
24
    {
25 7
        if ($event instanceof MvcEvent) {
26 7
            MaglLegacy::getInstance()->setApplication($event->getApplication());
27
        }
28 7
    }
29
30
    /**
31
     * @inheritDoc
32
     */
33 10
    public function getConfig()
34
    {
35 10
        return include __DIR__ . '/../../config/module.config.php';
36
    }
37
38
    /**
39
     * @inheritDoc
40
     */
41 8
    public function getAutoloaderConfig()
42
    {
43
        return array(
44
            'Laminas\Loader\StandardAutoloader' => array(
45
                'namespaces' => array(
46 8
                    __NAMESPACE__ => __DIR__,
47
                ),
48
            ),
49
        );
50
    }
51
}
52