-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support wider array @param syntax #24
Comments
Interesting, I was under the impression that the "array<string, int>" was not supported by PHPStan. I'll give it another look! AbstractMissingTypeHintRule is using "better-reflection" under the hood, that itself uses "phpdocumentor/type-resolver". I'll keep this issue open until I have some time to see if I can use the same API that PHPStan uses internally. |
I have not given this a thorough inspection but PHPStan holds reflection information directly on Scope (https://github.com/phpstan/phpstan/blob/master/src/Rules/FunctionDefinitionCheck.php#L79) so there should be no need to use Better Reflection but to use PHPStan's reflection This could also fix the problem with speed phpstan-strict-rules have, if I remove them from phpstan.neon execution is much faster |
Excellent idea! That was a hell of a refactoring, but I'm almost done: #27 |
PHPStan supports
@param
array syntax such asBut
\TheCodingMachine\PHPStan\Rules\TypeHints\AbstractMissingTypeHintRule
returns error when analyzing the docblockWe end up having to document as
@param int[]
or@param mixed[]
The text was updated successfully, but these errors were encountered: