Fix argument.type PHPStan errors#553
Conversation
| - | ||
| identifier: argument.type |
There was a problem hiding this comment.
since argument types were ignored, the root cause for #552 was not detected.
|
|
||
| // must respect PHPStan anonymous internal naming \Rector\NodeTypeResolver\PHPStan\Scope\PHPStanNodeScopeResolver::ANONYMOUS_CLASS_START_REGEX | ||
| return new Class_('AnonymousClass1234', [ | ||
| // @phpstan-ignore argument.type |
There was a problem hiding this comment.
We don't use inline ignores by convention. Better use assert or fix this one
There was a problem hiding this comment.
to be hones, I did not understand what the error is about at this line
There was a problem hiding this comment.
send a try and error fix
| if (! $expr->value instanceof Array_) { | ||
| return null; | ||
| } | ||
|
|
| return null; | ||
| } | ||
|
|
||
| $matchedNullableVariableNameToType = $variableNameToTypeCollection->matchByVariableName($variableName); |
|
@staabm please run: thank you. |
| throw new NotImplementedYetException(); | ||
| } | ||
|
|
||
| if (! $className instanceof Name) { |
There was a problem hiding this comment.
probably need test for $firstArg->value is a String_, not Foo::class, but "Foo", so if it is a String_, use its value, also possibly verify by value via ValueResolver, but that can be later 👍
There was a problem hiding this comment.
yeah, please do this for me.
I did not plan to deep dive into this codebase :)
|
Ready to land |
|
Thank you @staabm |
No description provided.