$container is of type object<Everlution\Navigation\ContainerInterface>, but the property $container was declared to be of type object<Everlution\Naviga...eredContainerInterface>. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?
Our type inference engine has found a suspicous assignment of a value to a property.
This check raises an issue when a value that can be of a given class or a super-class
is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.
The expression $this->items of type Everlution\Navigation\Item\ItemInterface[] 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.
It seems like array_merge($sortable, $items) of type array is incompatible with the declared type array<integer,object<Eve...on\Item\ItemInterface>> of property $items.
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...
45
}
46
47
return $this->items;
48
}
49
50
public function get(string $name): ItemInterface
51
{
52
return $this->items[$name];
53
}
54
55
private function ascending(SortableInterface $first, SortableInterface $second)
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.