1 | <?php |
||||
2 | |||||
3 | use hipanel\modules\hosting\grid\IpGridView; |
||||
0 ignored issues
–
show
|
|||||
4 | use hipanel\widgets\Box; |
||||
5 | use yii\data\ArrayDataProvider; |
||||
6 | use yii\helpers\Html; |
||||
7 | |||||
8 | if (Yii::getAlias('@ip', false) && $model->ips_num) : ?> |
||||
9 | <?php $box = Box::begin(['renderBody' => false]) ?> |
||||
10 | <?php $box->beginHeader() ?> |
||||
11 | <?= $box->renderTitle(Yii::t('hipanel:server', 'IP addresses'), $model->ips_num) ?> |
||||
12 | <?php if (Yii::$app->user->can('ip.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
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...
|
|||||
13 | <?php $box->beginTools() ?> |
||||
14 | <?= Html::a( |
||||
15 | Yii::t('hipanel:server', 'Manage IP addresses'), |
||||
16 | ['@ip', 'IpSearch' => ['server_in' => $model->name]], |
||||
17 | ['class' => 'btn btn-default btn-sm'] |
||||
18 | ) ?> |
||||
19 | <?php $box->endTools() ?> |
||||
20 | <?php endif ?> |
||||
21 | <?php $box->endHeader() ?> |
||||
22 | <?php $box->beginBody() ?> |
||||
23 | <?= IpGridView::widget([ |
||||
24 | 'dataProvider' => new ArrayDataProvider([ |
||||
25 | 'allModels' => $model->ips, |
||||
26 | 'pagination' => [ |
||||
27 | 'pageSize' => 25, |
||||
28 | ], |
||||
29 | 'sort' => false, |
||||
30 | ]), |
||||
31 | 'layout' => '{items}', |
||||
32 | 'boxed' => false, |
||||
33 | 'summary' => false, |
||||
34 | 'controllerUrl' => '@ip', |
||||
35 | 'columns' => ['ip', 'ptr', 'services'], |
||||
36 | ]) ?> |
||||
37 | <?php $box->endBody() ?> |
||||
38 | <?php $box->end() ?> |
||||
39 | <?php endif ?> |
||||
40 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths