heiglandreas, Question for the @phpstan pros:
What am I missing here?
final class stdClassList
{
/** @var array<int, stdClass> */
public readonly array $classes;public function __construct(stdClass ...$classes)
{
$this->classes = $classes;
}
}https://phpstan.org/r/5b86ba21-7486-4eb5-bccf-1ebd4327829e
PHPStan reports "Property stdClassList::$classes (array<int, stdClass>) does not accept array<int|string, stdClass>." but I would expect that $classes will always be array<int, stdClass> without any string-keys
Add comment