-
Notifications
You must be signed in to change notification settings - Fork 123
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
Argument order of "Api::api" method is not correct #116
Comments
Yeah, I know. This is the problem with several other methods as well. PhpStorm always complains about it to me. Unfortunately we can't change argument order because that would be a BC break. |
What we can do is to remove default value for |
I agree. |
So, if you'd like you can send PR that would remove default value for optional method arguments, that come (in method declaration) before non-optional arguments. There are several such methods for sure. |
I don't think, that changing argument order is a way to go, because in API calls the result changes greatly based on the request method (get/post/etc) so specifying it first and then url makes sense actually. |
@dereuromark , should I expect PR for review soon? |
The order as per clean code should not have optional values prior to required ones:
Instead if should be
So you can actually do
and the others are actually optional.
The text was updated successfully, but these errors were encountered: