Issues (34)

tests/_app/views/layouts/main.php (1 issue)

1
<?php
2
3
if (Yii::$app->user->getIsGuest()) {
0 ignored issues
show
The method getIsGuest() 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

3
if (Yii::$app->user->/** @scrutinizer ignore-call */ getIsGuest()) {

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...
4
    echo \yii\helpers\Html::a('Login', ['/user/security/login']);
5
    echo \yii\helpers\Html::a('Registration', ['/user/registration/register']);
6
} else {
7
    echo \yii\helpers\Html::a('Logout', ['/user/security/logout']);
8
}
9
10
echo $content;
11