Module   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 27
c 0
b 0
f 0
ccs 9
cts 9
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfig() 0 3 1
A onBootstrap() 0 11 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright https://yawik.org/COPYRIGHT.php
8
 */
9
10
/** */
11
namespace Install;
12
13
use Laminas\ModuleManager\Feature;
14
use Laminas\EventManager\EventInterface;
15
16
/**
17
 * Module "Install" initialization.
18
 *
19
 * @author Mathias Gelhausen <[email protected]>
20
 * @since 0.20
21
 */
22
class Module implements Feature\ConfigProviderInterface, Feature\BootstrapListenerInterface
23
{
24 1
    public function getConfig()
25
    {
26 1
        return include __DIR__ . '/../config/module.config.php';
27
    }
28
29
30
    /**
31
     * Listen to the bootstrap event.
32
     *
33
     * @param EventInterface|\Laminas\Mvc\MvcEvent $e
34
     *
35
     * @return void
36
     * @throws \Exception
37
     */
38 1
    public function onBootstrap(EventInterface $e)
39
    {
40 1
        $application  = $e->getApplication();
0 ignored issues
show
Bug introduced by
The method getApplication() does not exist on Laminas\EventManager\EventInterface. It seems like you code against a sub-type of Laminas\EventManager\EventInterface such as Laminas\Mvc\MvcEvent. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

40
        /** @scrutinizer ignore-call */ 
41
        $application  = $e->getApplication();
Loading history...
41 1
        $eventManager = $application->getEventManager();
42 1
        $services     = $application->getServiceManager();
43
44 1
        $services->get('Install/Listener/LanguageSetter')
45 1
                 ->attach($eventManager);
46
47
        // start tracy debugging
48 1
        $services->get('Tracy')->startDebug();
49
    }
50
}
51