Skip to content
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

Update return type to static to improve static analysis #644

Merged
merged 1 commit into from
May 1, 2019

Conversation

virgofx
Copy link
Contributor

@virgofx virgofx commented Apr 30, 2019

While there is no official PHPDoc standard ... Pretty much all static analyzers (phpstan, etc.) and leading IDEs (e.g. PHPStorm) all support the @return static. Making this change will improve static analysis and prevent unnecessary docblock declarations to coerce the returned type into the class referenced from the static call.

@ob-stripe
Copy link
Contributor

Hi @virgofx, thanks for the contribution! This looks peaceful to me.

@virgofx
Copy link
Contributor Author

virgofx commented Apr 30, 2019

👍 Very minor and there were a few other areas in PHP docblock in the code that already use @return static so it just keeps it inline with those.

@ob-stripe ob-stripe merged commit e28d486 into stripe:master May 1, 2019
@ob-stripe
Copy link
Contributor

Released in 6.34.3.

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

Successfully merging this pull request may close these issues.

None yet

2 participants