-
-
Notifications
You must be signed in to change notification settings - Fork 947
Support literal-string as an array key type #7353
Copy link
Copy link
Closed
phpstan/phpstan-src
#1420Labels
Milestone
Description
Feature request
phpstan.org/r/23576b4c-e502-4c2b-a308-41efc1af22a1
<?php declare(strict_types = 1);
class HelloWorld
{
/** @param array<literal-string, mixed> $data */
public function sayHello(array $data): void
{
\PHPStan\dumpType($data); // Dumped type: array<string, mixed>
}
}Did PHPStan help you today? Did it make you happy in any way?
💯
Reactions are currently unavailable