Skip to content

SlevomatCodingStandard.TypeHints.ReturnTypeHint docs #1746

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

Open
kkmuffme opened this issue Apr 27, 2025 · 0 comments
Open

SlevomatCodingStandard.TypeHints.ReturnTypeHint docs #1746

kkmuffme opened this issue Apr 27, 2025 · 0 comments

Comments

@kkmuffme
Copy link

Afaik the docs are wrong for SlevomatCodingStandard.TypeHints.ReturnTypeHint:

This sniff can cause an error if you're overriding or implementing a parent method which does not have typehints. In such cases add @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint annotation to the method to have this sniff skip it.

However for the return type hint, this doesn't matter: https://3v4l.org/el8LC#v8.4.6 (this is only an issue for properties/params)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant