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

PHPDoc: use union of literals for $method parameter throughout #1487

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Apr 27, 2023

Replaces @param string $method with the more specific @param 'delete'|'get'|'post' $method.

This is possibly a little stricter than necessary as CurlClient does \strtolower, but I think it's best to standardize on lower case.

This does mean that users using psalm/phpstan/etc. on a sufficiently strict setting will get new type errors when they upgrade, but that's in line with our policy that even "breaking" PHPDoc changes can happen in minor versions.

@richardm-stripe
Copy link
Contributor Author

Just rediscovered this has been hanging out for months. No reason not to merge it IMO.

@richardm-stripe richardm-stripe requested review from a team and pakrym-stripe and removed request for a team July 18, 2023 16:24
@richardm-stripe richardm-stripe merged commit 67d021b into master Jul 18, 2023
22 checks passed
@remi-stripe remi-stripe deleted the richardm-better-method-types branch September 28, 2023 23:03
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

Successfully merging this pull request may close these issues.

None yet

2 participants