Closed lulco closed 3 years ago
0
is accepted to and is not positive.
hm why would I do query with limit 0?
LIMIT 0 quickly returns an empty set. This can be useful for checking the validity of a query. It can also be employed to obtain the types of the result columns if you are using a MySQL API that makes result set metadata available.
https://dev.mysql.com/doc/refman/5.7/en/limit-optimization.html
OK, so I've added 0, now it is positive-int|0
@dg any other problem here? I resolved your objection, so if it will not be accepted because whatever reason, please say it :) I will try to add this check to phpstan-nette stubs
Well, there are no @phpstan-param
annotations in the framework and I'm not sure if this is such an important thing to add it.
OK, I understand, but this is something you could write week ago :)
This change could help developers using nette/database with phpstan to avoid error "Negative offset or limit" thrown in drivers