Issues (23)

Events.php (3 issues)

Labels
Severity
1
<?php
2
namespace humhub\modules\steam;
3
4
use Yii;
5
use yii\helpers\Url;
0 ignored issues
show
The type yii\helpers\Url was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use humhub\modules\steam\widgets\SteamFrame;
7
use humhub\models\Setting;
0 ignored issues
show
The type humhub\models\Setting was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
9
class Events extends \yii\base\BaseObject
10
{
11
12
    public static function onAdminMenuInit(\yii\base\Event $event)
0 ignored issues
show
The type yii\base\Event was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
    {
14
        $event->sender->addItem([
15
            'label' => Yii::t('SteamModule.base', 'Steam Settings'),
16
            'url' => Url::toRoute('/steam/admin/index'),
17
            'group' => 'settings',
18
            'icon' => '<i class="fab fa-steam"></i>',
19
            'isActive' => Yii::$app->controller->module && Yii::$app->controller->module->id == 'steam' && Yii::$app->controller->id == 'admin',
20
            'sortOrder' => 650
21
        ]);
22
    }
23
24
public static function addSteamFrame($event)
25
    {
26
        if (Yii::$app->user->isGuest) {
27
            return;
28
        }
29
        $event->sender->view->registerAssetBundle(Assets::class);
30
        $event->sender->addWidget(SteamFrame::class, [], [
31
            'sortOrder' => Setting::Get('timeout', 'steam')
32
        ]);
33
    }
34
}
35