Issues (213)

src/views/server/modal/hardwareSettings.php (1 issue)

Labels
Severity
1
<?php
2
3
use hipanel\helpers\Url;
4
use hipanel\widgets\Box;
5
use hipanel\widgets\Pjax;
6
use yii\helpers\Html;
7
8
?>
9
10
<?php if (Yii::getAlias('@part', false) && Yii::$app->user->can('support')) : ?>
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

10
<?php if (Yii::getAlias('@part', false) && Yii::$app->user->/** @scrutinizer ignore-call */ can('support')) : ?>

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...
11
    <div class="row">
12
        <?php Pjax::begin(['enablePushState' => false]) ?>
13
        <div class="col-md-12">
14
            <?php $box = Box::begin(['renderBody' => false, 'options' => ['class' => 'box-widget'], 'bodyOptions' => ['class' => 'no-padding']]) ?>
15
            <?php $box->beginHeader() ?>
16
            <?= $box->renderTitle(Yii::t('hipanel:server', 'Configuration')) ?>
17
            <?php $box->beginTools() ?>
18
            <?= Html::a(Yii::t('hipanel', 'Details'), Url::toSearch('part', ['dst_name_like' => $model->name]), ['class' => 'btn btn-default btn-xs', 'data-pjax' => 0]) ?>
19
            <?php $box->endTools() ?>
20
            <?php $box->endHeader() ?>
21
            <?php $box->beginBody() ?>
22
            <?php $url = Url::to(['@part/render-object-parts', 'id' => $model->id]) ?>
23
            <?= Html::tag('div', '', ['class' => 'server-parts']) ?>
24
            <?php $this->registerJs("$('.server-parts').load('$url', function () {
25
                                $(this).closest('.box').find('.overlay').remove();
26
                            });") ?>
27
            <?php $box->endBody() ?>
28
            <div class="overlay"><i class="fa fa-refresh fa-spin"></i></div>
29
            <?php $box->end() ?>
30
        </div>
31
        <?php Pjax::end() ?>
32
    </div>
33
<?php endif ?>
34