By adding the positive-int typehint to Pagerfanta::setCurrentPage it only becomes annoying for consumers of the library. I understand that it's nice to add this but I think it should be just asserted in the method.
Currently PHPStan reports 20 errors on our project:
Parameter #1 $currentPage of method Pagerfanta\Pagerfanta<Entity>::setCurrentPage() expects int<1, max>, int given.
By adding the
positive-int
typehint toPagerfanta::setCurrentPage
it only becomes annoying for consumers of the library. I understand that it's nice to add this but I think it should be just asserted in the method.Currently PHPStan reports 20 errors on our project:
I have to add this:
in all 20 places where I call:
Would it be possible to reconsider this?