Completed
Push — develop ( 1aadc7...f2612d )
by
unknown
25:44 queued 16:02
created

Module::getConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * YAWIK
4
 * Settings Module Bootstrap
5
 *
6
 * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
 * @license   MIT
8
 */
9
10
/** Core */
11
namespace Settings;
12
13
use Zend\Mvc\MvcEvent;
14
use Settings\Listener\InjectSubNavigationListener;
15
16
/**
17
 * Bootstrap class of the Settings module
18
 *
19
 */
20
class Module
21
{
22
    /**
23
     * Sets up services on the bootstrap event.
24
     *
25
     * @internal
26
     *     Creates the translation service and a ModuleRouteListener
27
     *
28
     * @param MvcEvent $e
29
     */
30
    public function onBootstrap(MvcEvent $e)
31
    {
32
        $events = $e->getApplication()->getEventManager();
33
        $events->attach(
34
            array(MvcEvent::EVENT_RENDER, MvcEvent::EVENT_RENDER_ERROR),
0 ignored issues
show
Documentation introduced by
array(\Zend\Mvc\MvcEvent...nt::EVENT_RENDER_ERROR) is of type array<integer,?>, but the function expects a string.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
35
            new InjectSubNavigationListener(),
36
            10
37
        );
38
    }
39
40
    /**
41
     * Loads module specific configuration.
42
     *
43
     * @return array
44
     */
45
    public function getConfig()
46
    {
47
        return include __DIR__ . '/config/module.config.php';
48
    }
49
50
    /**
51
     * Loads module specific autoloader configuration.
52
     *
53
     * @return array
54
     */
55
    public function getAutoloaderConfig()
56
    {
57
        return array(
58
            'Zend\Loader\StandardAutoloader' => array(
59
                'namespaces' => array(
60
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
61
                ),
62
            ),
63
        );
64
    }
65
}
66