Is "scalar" an official type? #4507
-
Hi, I noticed that See https://phpstan.org/r/a61337af-e21d-440f-9da0-17c8b50d3cc3 It would be nice to use it in a scalar map ala |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I guess that some supported types can be missing from https://phpstan.org/writing-php-code/phpdoc-types because they appear in the wild but I don't find them valuable myself. Feel free to update the docs (there's an "Edit" button at the bottom). For the actually supported types you can look in the source code: https://github.com/phpstan/phpstan-src/blob/ec4e7edfe622c24a5e037d3a088ed8175275737e/src/PhpDoc/TypeNodeResolver.php#L129-L230 |
Beta Was this translation helpful? Give feedback.
I guess that some supported types can be missing from https://phpstan.org/writing-php-code/phpdoc-types because they appear in the wild but I don't find them valuable myself. Feel free to update the docs (there's an "Edit" button at the bottom).
For the actually supported types you can look in the source code: https://github.com/phpstan/phpstan-src/blob/ec4e7edfe622c24a5e037d3a088ed8175275737e/src/PhpDoc/TypeNodeResolver.php#L129-L230