Issues (213)

src/views/menus/dashboardItem.php (3 issues)

1
<?php
2
3
use hipanel\modules\dashboard\widgets\ObjectsCountWidget;
0 ignored issues
show
The type hipanel\modules\dashboar...gets\ObjectsCountWidget 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...
4
use hipanel\modules\dashboard\widgets\SearchForm;
0 ignored issues
show
The type hipanel\modules\dashboard\widgets\SearchForm 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...
5
use hipanel\modules\dashboard\widgets\SmallBox;
6
use hipanel\modules\server\models\ServerSearch;
7
use yii\helpers\Html;
8
use yii\helpers\Url;
9
10
?>
11
<div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
12
    <?php $box = SmallBox::begin([
13
        'boxTitle' => Yii::t('hipanel', 'Servers'),
14
        'boxIcon' => 'fa-server',
15
        'boxColor' => SmallBox::COLOR_TEAL,
16
    ]) ?>
17
    <?php $box->beginBody() ?>
18
    <?= ObjectsCountWidget::widget([
19
        'totalCount' => $totalCount['servers'],
20
        'ownCount' => $model->count['servers'],
21
    ]) ?>
22
    <br>
23
    <br>
24
    <?= SearchForm::widget([
25
        'formOptions' => [
26
            'id' => 'server-search',
27
            'action' => Url::to('@server/index'),
28
        ],
29
        'model' => new ServerSearch(),
30
        'attribute' => 'name_like',
31
        'buttonColor' => SmallBox::COLOR_TEAL,
32
    ]) ?>
33
    <?php $box->endBody() ?>
34
    <?php $box->beginFooter() ?>
35
    <?php if ($model->count['servers'] || Yii::$app->user->can('server.read')) : ?>
0 ignored issues
show
The method can() does not exist on null. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

35
    <?php if ($model->count['servers'] || Yii::$app->user->/** @scrutinizer ignore-call */ can('server.read')) : ?>

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
36
        <?= Html::a(Yii::t('hipanel', 'View') . $box->icon(), '@server/index', ['class' => 'small-box-footer']) ?>
37
    <?php endif ?>
38
    <?php if (Yii::$app->user->can('server.create')) : ?>
39
        <?= Html::a(Yii::t('hipanel', 'Create') . $box->icon('fa-plus'), '@server/create', ['class' => 'small-box-footer']) ?>
40
    <?php endif ?>
41
    <?php if (Yii::$app->user->can('deposit')) : ?>
42
        <?= Html::a(Yii::t('hipanel', 'Buy') . $box->icon('fa-shopping-cart'), '@server/buy', ['class' => 'small-box-footer']) ?>
43
    <?php endif ?>
44
    <?php $box->endFooter() ?>
45
    <?php $box::end() ?>
46
</div>
47
48