GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — feature/EventModule ( 84f087 )
by Alexander
10:21
created

EventModule::bootstrap()   B

Complexity

Conditions 6
Paths 4

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 8.8571
cc 6
eloc 6
nc 4
nop 1
1
<?php
2
3
namespace app\modules\event;
4
5
6
use app\components\BaseModule;
7
use app\modules\event\interfaces\EventInterface;
8
use yii\base\Application;
9
use yii\base\BootstrapInterface;
10
11
12
/**
13
 * Class EventModule
14
 * @package app\modules\event
15
 *
16
 * This module provide ability to attach custom handlers to any existing event from any module, even if module itself
17
 * will not be bootstrapped
18
 */
19
class EventModule extends BaseModule implements BootstrapInterface
20
{
21
    /**
22
     * Bootstrap method to be called during application bootstrap stage.
23
     * @param Application $app the application currently running
24
     */
25
    public function bootstrap($app)
26
    {
27
        foreach ($app->modules as $module) {
28
            if (is_object($module) && $module instanceof EventInterface) {
29
                $module->attachEventsHandlers();
30
            } elseif (is_array($module) && in_array(EventInterface::class, class_implements($module['class']), false)) {
31
                $module['class']::attachEventsHandlers();
32
            }
33
        }
34
    }
35
}