You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sniff can cause an error if you're overriding parent property which does not have typehints. In such cases add @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint annotation to the property to have this sniff skip it.
I think it would make sense if there were an option to disable the rule for public/protected properties/functions/constants of classes that extend/implement a class/interface.
This would prevent having to add the suppress in all those files, when initially enabling this rule.
Additionally, this would still set the type hints for private properties/functions/constants - which currently does not happen, since the rule has to be completely disabled.
For SlevomatCodingStandard.TypeHints.ReturnTypeHint this isn't needed bc there that's not a problem (see #1746)
The text was updated successfully, but these errors were encountered:
SlevomatCodingStandard.TypeHints.ClassConstantTypeHint
SlevomatCodingStandard.TypeHints.PropertyTypeHint
SlevomatCodingStandard.TypeHints.ParameterTypeHint
I think it would make sense if there were an option to disable the rule for public/protected properties/functions/constants of classes that extend/implement a class/interface.
This would prevent having to add the suppress in all those files, when initially enabling this rule.
Additionally, this would still set the type hints for private properties/functions/constants - which currently does not happen, since the rule has to be completely disabled.
For
SlevomatCodingStandard.TypeHints.ReturnTypeHint
this isn't needed bc there that's not a problem (see #1746)The text was updated successfully, but these errors were encountered: