The expression $this->ungroupedChecks of type BretRZaun\StatusPage\StatusCheckerGroup[] is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an
empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using empty(..) or !empty(...) instead.
Loading history...
22
$this->ungroupedChecks = new StatusCheckerGroup('');
It seems like new \BretRZaun\StatusPage\StatusCheckerGroup('') of type object<BretRZaun\StatusPage\StatusCheckerGroup> is incompatible with the declared type array<integer,object<Bre...ge\StatusCheckerGroup>> of property $ungroupedChecks.
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...
23
$this->results[] = $this->ungroupedChecks;
24
}
25
$this->ungroupedChecks->addCheck($checker);
26
}
27
28
public function addGroup(StatusCheckerGroup $group)
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.