@@ -38,7 +38,7 @@ public function testBadPageOption(mixed $page, int $expectedPage): void
3838 $ this ->assertFalse ($ paginator ->pageExists ());
3939 }
4040
41- public function getTestBadPageOptionProvider (): array
41+ public static function getTestBadPageOptionProvider (): array
4242 {
4343 return [
4444 ['string ' , 1 ],
@@ -71,7 +71,7 @@ public function testBadNumberMaxPerPageOption(): void
7171 $ this ->expectException (InvalidOptionsException::class);
7272 $ this ->expectExceptionMessage ('"max_per_page" ' );
7373
74- $ options = $ this ->getDefaultOptions (1 , -5 , $ this -> getDefaultIterator ());
74+ $ options = $ this ->getDefaultOptions (1 , -5 , static :: getDefaultIterator ());
7575 $ this ->createPaginator ($ options );
7676 }
7777
@@ -127,7 +127,7 @@ public function testCount(): void
127127
128128 public function testCountWithoutData (): void
129129 {
130- $ options = $ this ->getDefaultOptions (1 , 5 , $ this -> createIterator ([]));
130+ $ options = $ this ->getDefaultOptions (1 , 5 , static :: createIterator ([]));
131131 $ paginator = $ this ->createPaginator ($ options );
132132 $ this ->assertSame (0 , $ paginator ->count ());
133133 $ this ->assertCount (0 , $ paginator );
@@ -158,7 +158,7 @@ public function testHaveToPaginateNotEnoughData(): void
158158
159159 public function testHaveToPaginateWithoutData (): void
160160 {
161- $ options = $ this ->getDefaultOptions (1 , 5 , $ this -> createIterator ([]));
161+ $ options = $ this ->getDefaultOptions (1 , 5 , static :: createIterator ([]));
162162 $ paginator = $ this ->createPaginator ($ options );
163163
164164 $ this ->assertFalse ($ paginator ->haveToPaginate ());
@@ -186,15 +186,15 @@ public function testGetFirstIndice(mixed $page, int $maxPerPage, \ArrayIterator
186186 $ this ->assertSame ($ expectedResult , $ paginator ->getFirstIndice ());
187187 }
188188
189- public function getTestGetFirstIndiceProvider (): array
189+ public static function getTestGetFirstIndiceProvider (): array
190190 {
191191 return [
192- [1 , 5 , $ this -> getDefaultIterator (), 1 ],
193- [3 , 5 , $ this -> getDefaultIterator (), 11 ],
194- [11 , 5 , $ this -> getDefaultIterator (), 51 ],
195- [1 , 5 , $ this -> createIterator ([]), 0 ], // No data
196- ['page ' , 5 , $ this -> getDefaultIterator (), 1 ], // Bad page
197- [1000 , 5 , $ this -> getDefaultIterator (), 51 ], // Page too high
192+ [1 , 5 , static :: getDefaultIterator (), 1 ],
193+ [3 , 5 , static :: getDefaultIterator (), 11 ],
194+ [11 , 5 , static :: getDefaultIterator (), 51 ],
195+ [1 , 5 , static :: createIterator ([]), 0 ], // No data
196+ ['page ' , 5 , static :: getDefaultIterator (), 1 ], // Bad page
197+ [1000 , 5 , static :: getDefaultIterator (), 51 ], // Page too high
198198 ];
199199 }
200200
@@ -220,15 +220,15 @@ public function testGetLastIndice(mixed $page, int $maxPerPage, \ArrayIterator $
220220 $ this ->assertSame ($ expectedResult , $ paginator ->getLastIndice ());
221221 }
222222
223- public function getTestGetLastIndiceProvider (): array
223+ public static function getTestGetLastIndiceProvider (): array
224224 {
225225 return [
226- [1 , 5 , $ this -> getDefaultIterator (), 5 ],
227- [3 , 5 , $ this -> getDefaultIterator (), 15 ],
228- [11 , 5 , $ this -> getDefaultIterator (), 52 ],
229- [1 , 5 , $ this -> createIterator ([]), 0 ], // No data
230- ['page ' , 5 , $ this -> getDefaultIterator (), 5 ], // Bad page
231- [1000 , 5 , $ this -> getDefaultIterator (), 52 ], // Page too high
226+ [1 , 5 , static :: getDefaultIterator (), 5 ],
227+ [3 , 5 , static :: getDefaultIterator (), 15 ],
228+ [11 , 5 , static :: getDefaultIterator (), 52 ],
229+ [1 , 5 , static :: createIterator ([]), 0 ], // No data
230+ ['page ' , 5 , static :: getDefaultIterator (), 5 ], // Bad page
231+ [1000 , 5 , static :: getDefaultIterator (), 52 ], // Page too high
232232 ];
233233 }
234234
@@ -254,15 +254,15 @@ public function testGetFirstPage(mixed $page, int $maxPerPage, \ArrayIterator $i
254254 $ this ->assertSame ($ expectedResult , $ paginator ->getFirstPage ());
255255 }
256256
257- public function getTestGetFirstPageProvider (): array
257+ public static function getTestGetFirstPageProvider (): array
258258 {
259259 return [
260- [1 , 5 , $ this -> getDefaultIterator (), 1 ],
261- [3 , 5 , $ this -> getDefaultIterator (), 1 ],
262- [11 , 5 , $ this -> getDefaultIterator (), 1 ],
263- [1 , 5 , $ this -> createIterator ([]), 1 ], // No data
264- ['page ' , 5 , $ this -> getDefaultIterator (), 1 ], // Bad page
265- [1000 , 5 , $ this -> getDefaultIterator (), 1 ], // Page too high
260+ [1 , 5 , static :: getDefaultIterator (), 1 ],
261+ [3 , 5 , static :: getDefaultIterator (), 1 ],
262+ [11 , 5 , static :: getDefaultIterator (), 1 ],
263+ [1 , 5 , static :: createIterator ([]), 1 ], // No data
264+ ['page ' , 5 , static :: getDefaultIterator (), 1 ], // Bad page
265+ [1000 , 5 , static :: getDefaultIterator (), 1 ], // Page too high
266266 ];
267267 }
268268
@@ -288,15 +288,15 @@ public function testGetPreviousPage(mixed $page, int $maxPerPage, \ArrayIterator
288288 $ this ->assertSame ($ expectedResult , $ paginator ->getPreviousPage ());
289289 }
290290
291- public function getTestGetPreviousPageProvider (): array
291+ public static function getTestGetPreviousPageProvider (): array
292292 {
293293 return [
294- [1 , 5 , $ this -> getDefaultIterator (), null ],
295- [3 , 5 , $ this -> getDefaultIterator (), 2 ],
296- [11 , 5 , $ this -> getDefaultIterator (), 10 ],
297- [1 , 5 , $ this -> createIterator ([]), null ], // No data
298- ['page ' , 5 , $ this -> getDefaultIterator (), null ], // Bad page
299- [1000 , 5 , $ this -> getDefaultIterator (), 10 ], // Page too high
294+ [1 , 5 , static :: getDefaultIterator (), null ],
295+ [3 , 5 , static :: getDefaultIterator (), 2 ],
296+ [11 , 5 , static :: getDefaultIterator (), 10 ],
297+ [1 , 5 , static :: createIterator ([]), null ], // No data
298+ ['page ' , 5 , static :: getDefaultIterator (), null ], // Bad page
299+ [1000 , 5 , static :: getDefaultIterator (), 10 ], // Page too high
300300 ];
301301 }
302302
@@ -322,15 +322,15 @@ public function testGetPage(mixed $page, int $maxPerPage, \ArrayIterator $iterat
322322 $ this ->assertSame ($ expectedResult , $ paginator ->getPage ());
323323 }
324324
325- public function getTestGetPageProvider (): array
325+ public static function getTestGetPageProvider (): array
326326 {
327327 return [
328- [1 , 5 , $ this -> getDefaultIterator (), 1 ],
329- [3 , 5 , $ this -> getDefaultIterator (), 3 ],
330- [11 , 5 , $ this -> getDefaultIterator (), 11 ],
331- [1 , 5 , $ this -> createIterator ([]), 1 ], // No data
332- ['page ' , 5 , $ this -> getDefaultIterator (), 1 ], // Bad page
333- [1000 , 5 , $ this -> getDefaultIterator (), 11 ], // Page too high
328+ [1 , 5 , static :: getDefaultIterator (), 1 ],
329+ [3 , 5 , static :: getDefaultIterator (), 3 ],
330+ [11 , 5 , static :: getDefaultIterator (), 11 ],
331+ [1 , 5 , static :: createIterator ([]), 1 ], // No data
332+ ['page ' , 5 , static :: getDefaultIterator (), 1 ], // Bad page
333+ [1000 , 5 , static :: getDefaultIterator (), 11 ], // Page too high
334334 ];
335335 }
336336
@@ -346,15 +346,15 @@ public function testPageExists(mixed $page, int $maxPerPage, \ArrayIterator $ite
346346 $ this ->assertSame ($ expectedResult , $ paginator ->pageExists ());
347347 }
348348
349- public function getTestPageExistsProdiver (): array
349+ public static function getTestPageExistsProdiver (): array
350350 {
351351 return [
352- [1 , 5 , $ this -> getDefaultIterator (), true ],
353- [3 , 5 , $ this -> getDefaultIterator (), true ],
354- [11 , 5 , $ this -> getDefaultIterator (), true ],
355- [1 , 5 , $ this -> createIterator ([]), true ], // No data
356- ['page ' , 5 , $ this -> getDefaultIterator (), false ], // Bad page
357- [1000 , 5 , $ this -> getDefaultIterator (), false ], // Page too high
352+ [1 , 5 , static :: getDefaultIterator (), true ],
353+ [3 , 5 , static :: getDefaultIterator (), true ],
354+ [11 , 5 , static :: getDefaultIterator (), true ],
355+ [1 , 5 , static :: createIterator ([]), true ], // No data
356+ ['page ' , 5 , static :: getDefaultIterator (), false ], // Bad page
357+ [1000 , 5 , static :: getDefaultIterator (), false ], // Page too high
358358 ];
359359 }
360360
@@ -370,15 +370,15 @@ public function testGetNextPage(mixed $page, int $maxPerPage, \ArrayIterator $it
370370 $ this ->assertSame ($ expectedResult , $ paginator ->getNextPage ());
371371 }
372372
373- public function getTestGetNextPageProvider (): array
373+ public static function getTestGetNextPageProvider (): array
374374 {
375375 return [
376- [1 , 5 , $ this -> getDefaultIterator (), 2 ],
377- [3 , 5 , $ this -> getDefaultIterator (), 4 ],
378- [11 , 5 , $ this -> getDefaultIterator (), null ],
379- [1 , 5 , $ this -> createIterator ([]), null ], // No data
380- ['page ' , 5 , $ this -> getDefaultIterator (), 2 ], // Bad page
381- [1000 , 5 , $ this -> getDefaultIterator (), null ], // Page too high
376+ [1 , 5 , static :: getDefaultIterator (), 2 ],
377+ [3 , 5 , static :: getDefaultIterator (), 4 ],
378+ [11 , 5 , static :: getDefaultIterator (), null ],
379+ [1 , 5 , static :: createIterator ([]), null ], // No data
380+ ['page ' , 5 , static :: getDefaultIterator (), 2 ], // Bad page
381+ [1000 , 5 , static :: getDefaultIterator (), null ], // Page too high
382382 ];
383383 }
384384
@@ -404,15 +404,15 @@ public function testGetLastPage(mixed $page, int $maxPerPage, \ArrayIterator $it
404404 $ this ->assertSame ($ expectedResult , $ paginator ->getLastPage ());
405405 }
406406
407- public function getTestGetLastPageProvider (): array
407+ public static function getTestGetLastPageProvider (): array
408408 {
409409 return [
410- [1 , 5 , $ this -> getDefaultIterator (), 11 ],
411- [3 , 5 , $ this -> getDefaultIterator (), 11 ],
412- [11 , 5 , $ this -> getDefaultIterator (), 11 ],
413- [1 , 5 , $ this -> createIterator ([]), 1 ], // No data
414- ['page ' , 5 , $ this -> getDefaultIterator (), 11 ], // Bad page
415- [1000 , 5 , $ this -> getDefaultIterator (), 11 ], // Page too high
410+ [1 , 5 , static :: getDefaultIterator (), 11 ],
411+ [3 , 5 , static :: getDefaultIterator (), 11 ],
412+ [11 , 5 , static :: getDefaultIterator (), 11 ],
413+ [1 , 5 , static :: createIterator ([]), 1 ], // No data
414+ ['page ' , 5 , static :: getDefaultIterator (), 11 ], // Bad page
415+ [1000 , 5 , static :: getDefaultIterator (), 11 ], // Page too high
416416 ];
417417 }
418418
@@ -438,15 +438,15 @@ public function testIsFirstPage(mixed $page, int $maxPerPage, \ArrayIterator $it
438438 $ this ->assertSame ($ expectedResult , $ paginator ->isFirstPage ());
439439 }
440440
441- public function getTestIsFirstPageProvider (): array
441+ public static function getTestIsFirstPageProvider (): array
442442 {
443443 return [
444- [1 , 5 , $ this -> getDefaultIterator (), true ],
445- [3 , 5 , $ this -> getDefaultIterator (), false ],
446- [11 , 5 , $ this -> getDefaultIterator (), false ],
447- [1 , 5 , $ this -> createIterator ([]), true ], // No data
448- ['page ' , 5 , $ this -> getDefaultIterator (), true ], // Bad page
449- [1000 , 5 , $ this -> getDefaultIterator (), false ], // Page too high
444+ [1 , 5 , static :: getDefaultIterator (), true ],
445+ [3 , 5 , static :: getDefaultIterator (), false ],
446+ [11 , 5 , static :: getDefaultIterator (), false ],
447+ [1 , 5 , static :: createIterator ([]), true ], // No data
448+ ['page ' , 5 , static :: getDefaultIterator (), true ], // Bad page
449+ [1000 , 5 , static :: getDefaultIterator (), false ], // Page too high
450450 ];
451451 }
452452
@@ -472,15 +472,15 @@ public function testIsLastPage(mixed $page, int $maxPerPage, \ArrayIterator $ite
472472 $ this ->assertSame ($ expectedResult , $ paginator ->isLastPage ());
473473 }
474474
475- public function getTestIsLastPageProvider (): array
475+ public static function getTestIsLastPageProvider (): array
476476 {
477477 return [
478- [1 , 5 , $ this -> getDefaultIterator (), false ],
479- [3 , 5 , $ this -> getDefaultIterator (), false ],
480- [11 , 5 , $ this -> getDefaultIterator (), true ],
481- [1 , 5 , $ this -> createIterator ([]), true ], // No data
482- ['page ' , 5 , $ this -> getDefaultIterator (), false ], // Bad page
483- [1000 , 5 , $ this -> getDefaultIterator (), true ], // Page too high
478+ [1 , 5 , static :: getDefaultIterator (), false ],
479+ [3 , 5 , static :: getDefaultIterator (), false ],
480+ [11 , 5 , static :: getDefaultIterator (), true ],
481+ [1 , 5 , static :: createIterator ([]), true ], // No data
482+ ['page ' , 5 , static :: getDefaultIterator (), false ], // Bad page
483+ [1000 , 5 , static :: getDefaultIterator (), true ], // Page too high
484484 ];
485485 }
486486
@@ -496,7 +496,7 @@ public function testIsLastPageIfPaginationNotInitialized(): void
496496
497497 public function testGetMaxPerPage (): void
498498 {
499- $ options = $ this ->getDefaultOptions (1 , 88 , $ this -> getDefaultIterator ());
499+ $ options = $ this ->getDefaultOptions (1 , 88 , static :: getDefaultIterator ());
500500 $ paginator = $ this ->createPaginator ($ options );
501501
502502 $ this ->assertSame (88 , $ paginator ->getMaxPerPage ());
@@ -514,15 +514,15 @@ public function testGetIterator(mixed $page, int $maxPerPage, \ArrayIterator $it
514514 $ this ->assertSame ($ iterator , $ paginator ->getIterator ());
515515 }
516516
517- public function getTestGetIteratorProvider (): array
517+ public static function getTestGetIteratorProvider (): array
518518 {
519519 return [
520- [1 , 5 , $ this -> getDefaultIterator ()],
521- [3 , 5 , $ this -> getDefaultIterator ()],
522- [11 , 5 , $ this -> getDefaultIterator ()],
523- [1 , 5 , $ this -> createIterator ([])], // No data
524- ['page ' , 5 , $ this -> getDefaultIterator ()], // Bad page
525- [1000 , 5 , $ this -> getDefaultIterator ()], // Page too high
520+ [1 , 5 , static :: getDefaultIterator ()],
521+ [3 , 5 , static :: getDefaultIterator ()],
522+ [11 , 5 , static :: getDefaultIterator ()],
523+ [1 , 5 , static :: createIterator ([])], // No data
524+ ['page ' , 5 , static :: getDefaultIterator ()], // Bad page
525+ [1000 , 5 , static :: getDefaultIterator ()], // Page too high
526526 ];
527527 }
528528
@@ -559,7 +559,7 @@ public function testIsInitializedTrue(): void
559559 protected function getDefaultOptions (mixed $ page = 1 , int $ perPage = 5 , ?\ArrayIterator $ iterator = null ): array
560560 {
561561 if (null === $ iterator ) {
562- $ iterator = $ this -> getDefaultIterator ();
562+ $ iterator = static :: getDefaultIterator ();
563563 }
564564
565565 return [
0 commit comments