Module   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 4
dl 0
loc 30
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A onBootstrap() 0 13 1
A getConfig() 0 3 1
A getAutoloaderConfig() 0 9 1
1
<?php
2
3
namespace Columnis;
4
5
use Zend\Mvc\ModuleRouteListener;
6
use Zend\Mvc\MvcEvent;
7
use Zend\Uri\UriFactory;
8
9
class Module {
10
11 1
    public function onBootstrap(MvcEvent $e) {
12 1
        UriFactory::registerScheme('chrome-extension', 'Zend\Uri\Uri');
13
14 1
        $eventManager = $e->getApplication()->getEventManager();
15 1
        $moduleRouteListener = new ModuleRouteListener();
16 1
        $moduleRouteListener->attach($eventManager);
17
18
        // get the cache listener service
19 1
        $cacheListener = $e->getApplication()->getServiceManager()->get('Columnis\Model\CacheListener');
20
21
        // attach the listeners to the event manager
22 1
        $e->getApplication()->getEventManager()->attach($cacheListener);
23 1
    }
24
25 1
    public function getConfig() {
26 1
        return include __DIR__.'/config/module.config.php';
27
    }
28
29 1
    public function getAutoloaderConfig() {
30
        return array(
31
            'Zend\Loader\StandardAutoloader' => array(
32
                'namespaces' => array(
33 1
                    __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
34 1
                ),
35 1
            ),
36 1
        );
37
    }
38
}
39