-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Description
Feature request
While it would be convenient to copy and paste the type generated by PHPStan\dumpType() into @return, it's not actually consistent with the types accepted by phpstan/phpdoc-parser.
$result = [];
$result['Shall we dance?'] = 'yes';
$result["\0"] = "\000";
$result["\n"] = "\n";
$result["\x09"] = "\x09";
$result["\x7f"] = "\x7f";
assertType('array{\'Shall we dance?\': \'yes\', "\000": "\000", "\n": "\n", "\t": "\t", "\x7f": "\x7f"}', $result);
// Expected type array{'Shall we dance?': 'yes', "\000": "\000", "\n": "\n", "\t": "\t", "\x7f": "\x7f"},
// actual: array{Shall we dance?: 'yes', : "\000",
: "\n", : "\t", �: '�'}https://phpstan.org/r/9e70bcb7-6b97-4b18-b928-3aacf2552d1b
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable