Both the $myVar assignment in line 1 and the $higher assignment in line 2
are dead. The first because $myVar is never used and the second because
$higher is always overwritten for every possible time line.
Loading history...
67
if (in_array($model->scenario, $this->scenarios, true)) {
$model of type object<yii\base\Component> is not a sub-type of object<yii\base\Model>. It seems like you assume a child class of the class yii\base\Component to be always present.
This check looks for parameters that are defined as one type in their type
hint or doc comment but seem to be used as a narrower type, i.e an
implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming
your parameter is of the expected type.
It seems like \yii\web\UploadedFile::g...odel, $this->attribute) of type array<integer,object<yii\web\UploadedFile>> is incompatible with the declared type object<yii\web\UploadedFile> of property $_file.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
Loading history...
69
if (is_array($this->_file) && !empty($this->_file)) {
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.