-
-
Notifications
You must be signed in to change notification settings - Fork 79
Parameters' getLimit returns string #71
Comments
Agreed, PR welcome. |
Sure, just one more question. If no |
No, it should return 0 in both cases. This is because an app may want to have different default limit to its max limit, so it needs to be able to tell when no query was set. e.g. https://github.com/flarum/core/blob/master/src/Api/Controller/AbstractSerializeController.php#L179 In fact, would it be more correct to return |
I would go for |
I was implementing the package at yet another project, until I noticed that the
Parameters
owngetLimit
returns a string. Yes, it does state in the docblock that it should return a string but I find this quite confusing. Mostly because within theLinksTrait
addPaginationLinks
the limit is used as an integer...My main point is should the
getLimit
method withinParameters
not return integer, and 0 by default instead of ''.The text was updated successfully, but these errors were encountered: