# Bug report ```php /** @var array<int, T> */ protected $items = []; /** * @return ?T */ public function broken(int $key) { $item = $this->items[$key] ?? null; if ($item) { } return $item; } ``` `Method GenericList::broken() should return T|null but returns array|T|null.` ### Code snippet that reproduces the problem https://phpstan.org/r/54561da3-8e55-438b-91b1-cf4c73eed57f ### Expected output No errors