-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
TypeHints.TypeHintDeclaration and traversableTypeHints #158
Comments
@Fuco1 Do you use last version? There was a bug that is fixed in last version. |
I use 2.4.1, should I use master? |
No, dont use master, the bug was fixed in 2.4.1. Could you please post here your ruleset.xml and the code with traversable type hints? |
The php code is
Configuration <?xml version="1.0"?>
<ruleset name="Standard">
<rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/TypeHintDeclarationSniff.php" />
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
<properties>
<property name="traversableTypeHints" type="array" value="
\Doctrine\Common\Collections\ArrayCollection
"/>
</properties>
</rule>
</ruleset> When I use the |
Should be fixed in release 2.4.2. For |
I confirm this works, thanks a lot for such a quick fix! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi.
I'm not sure how to configure this. I only got it working if I set fully qualified types in the codesniffer configuration and then use the same fully qualified type in the
@var
annotation. Is this expected behaviour? Shouldn't it infer the types based on theuse
declarations? Surely that is possible because theUnusedUses
sniff does the resolutions somehow.The text was updated successfully, but these errors were encountered: