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 — master ( d3bfca...80f711 )
by Alexander
10:26
created

FloatingPanel::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 22
rs 9.2
c 1
b 0
f 0
cc 1
eloc 12
nc 1
nop 0
1
<?php
2
3
namespace app\modules\floatPanel\widgets;
4
5
6
use app\modules\floatPanel\events\BeforeRenderEvent;
7
use kartik\icons\Icon;
8
use yii\base\Widget;
9
10
class FloatingPanel extends  Widget
0 ignored issues
show
Coding Style introduced by
Expected 1 space before "Widget"; 2 found
Loading history...
11
{
12
    const EVENT_BEFORE_RENDER = 'before-render';
13
14
    public $viewFile = 'FloatingPanel';
15
    public $bottom = false;
16
17
    public function run()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
18
    {
19
        \app\backend\assets\FrontendEditingAsset::register($this->view);
20
        $items = [
21
            [
22
                'label' => Icon::show('dashboard') . ' ' . \Yii::t('app', 'Backend'),
23
                'url' => ['/backend/'],
24
            ]
25
        ];
26
27
        $event = new BeforeRenderEvent();
28
        $event->items = $items;
29
        $this->trigger(self::EVENT_BEFORE_RENDER, $event);
30
31
        return $this->render(
32
            $this->viewFile,
33
            [
34
                'items' => $event->items,
35
                'bottom' => $this->bottom
36
            ]
37
        );
38
    }
39
}