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...b76d9a )
by Alexander
09:14
created

EventModule::bootstrap()   A

Complexity

Conditions 4
Paths 5

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 9
rs 9.2
cc 4
eloc 5
nc 5
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
            $class = is_object($module) ? get_class($module) : $module['class'];
29
            if (in_array(EventInterface::class, class_implements($class, false))) {
30
                $class::attachEventsHandlers();
31
            }
32
        }
33
    }
34
}