It seems like you call parent on a different method (all() instead of allCanView()). Are you sure this is correct? If so, you might want to change this to $this->all().
This check looks for a call to a parent method whose name is different than
the method from which it is called.
The expression parent::one($db); of type yii\db\ActiveRecord|array|null adds the type yii\db\ActiveRecord to the return on line 62 which is incompatible with the return type declared by the interface yii\db\QueryInterface::one of type array|boolean.
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.