| 1 | <?php |
||
| 15 | class OrderedContainer implements ContainerInterface |
||
| 16 | { |
||
| 17 | /** @var FilteredContainerInterface */ |
||
| 18 | private $container; |
||
| 19 | /** @var ItemInterface[] */ |
||
| 20 | private $items; |
||
| 21 | |||
| 22 | public function __construct(ContainerInterface $container) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return ItemInterface[] |
||
| 29 | */ |
||
| 30 | public function getItems(): array |
||
| 49 | |||
| 50 | public function get(string $name): ItemInterface |
||
| 54 | |||
| 55 | private function ascending(SortableInterface $first, SortableInterface $second) |
||
| 59 | } |
||
| 60 |
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.