Skip to content

Commit 8b30ca3

Browse files
committed
skip rector rule RemoveDataProviderParamKeysRector
1 parent 896bc2b commit 8b30ca3

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

rector.php

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
3636
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
3737
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
38+
use Rector\PHPUnit\CodeQuality\Rector\Class_\RemoveDataProviderParamKeysRector;
3839
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
3940
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
4041
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
@@ -166,6 +167,8 @@
166167
NullToStrictStringFuncCallArgRector::class,
167168

168169
CompactToVariablesRector::class,
170+
171+
RemoveDataProviderParamKeysRector::class,
169172
])
170173
// auto import fully qualified class names
171174
->withImportNames(removeUnusedImports: true)

tests/system/Pager/PagerRendererTest.php

+16-16
Original file line numberDiff line numberDiff line change
@@ -635,67 +635,67 @@ public function testPageStartEnd(array $details, int $pageStart, int $pageEnd):
635635
}
636636

637637
/**
638-
* @return array<string, list<array<string, int|URI>|int>> $details
638+
* @return array<string, array<string, mixed>> $details
639639
*/
640640
public static function providePageStartEnd(): iterable
641641
{
642642
$uri = new URI('http://example.com/foo');
643643

644644
return [
645645
'first page' => [
646-
[
646+
'details' => [
647647
'uri' => $uri,
648648
'pageCount' => 3,
649649
'total' => 25,
650650
'currentPage' => 1,
651651
'perPage' => 10,
652652
],
653-
1,
654-
10,
653+
'pageStart' => 1,
654+
'pageEnd' => 10,
655655
],
656656
'second page' => [
657-
[
657+
'details' => [
658658
'uri' => $uri,
659659
'pageCount' => 3,
660660
'total' => 25,
661661
'currentPage' => 2,
662662
'perPage' => 10,
663663
],
664-
11,
665-
20,
664+
'pageStart' => 11,
665+
'pageEnd' => 20,
666666
],
667667
'last page' => [
668-
[
668+
'details' => [
669669
'uri' => $uri,
670670
'pageCount' => 3,
671671
'total' => 25,
672672
'currentPage' => 3,
673673
'perPage' => 10,
674674
],
675-
21,
676-
25,
675+
'pageStart' => 21,
676+
'pageEnd' => 25,
677677
],
678678
'current greater last page' => [
679-
[
679+
'details' => [
680680
'uri' => $uri,
681681
'pageCount' => 3,
682682
'total' => 25,
683683
'currentPage' => 5,
684684
'perPage' => 10,
685685
],
686-
41,
687-
50,
686+
'pageStart' => 41,
687+
'pageEnd' => 50,
688688
],
689689
'current equal last page' => [
690-
[
690+
'details' => [
691691
'uri' => $uri,
692692
'pageCount' => 1,
693693
'total' => 10,
694694
'currentPage' => 1,
695695
'perPage' => 10,
696696
],
697-
1,
698-
10,
697+
'pageStart' => 1,
698+
'pageEnd' => 10,
699699
],
700700
];
701701
}

tests/system/Throttle/ThrottleTest.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ public static function provideTokenTimeCalculationUCs(): iterable
213213
{
214214
return [
215215
'2 capacity / 200 seconds (100s refresh, 0.01 tokens/s) -> 5 checks, 1 cost each' => [
216-
2,
217-
200,
218-
[
216+
'capacity' => 2,
217+
'seconds' => 200,
218+
'checkInputs' => [
219219
[ // 2 -> 1
220220
'testTime' => 0,
221221
'cost' => 1,
@@ -255,9 +255,9 @@ public static function provideTokenTimeCalculationUCs(): iterable
255255
],
256256
],
257257
'1 capacity / 3600 seconds (3600s refresh, 2.77e-4 tokens/s) -> 2 checks with 1 cost each' => [
258-
1,
259-
3600,
260-
[
258+
'capacity' => 1,
259+
'seconds' => 3600,
260+
'checkInputs' => [
261261
[ // 1 -> 0
262262
'testTime' => 0,
263263
'cost' => 1,
@@ -273,9 +273,9 @@ public static function provideTokenTimeCalculationUCs(): iterable
273273
],
274274
],
275275
'10 capacity / 200 seconds (20s refresh, 0.05 tokens/s) -> 7 checks with different costs (RNG)' => [
276-
10,
277-
200,
278-
[
276+
'capacity' => 10,
277+
'seconds' => 200,
278+
'checkInputs' => [
279279
[ // -2t / 10 -> 8
280280
'testTime' => 0,
281281
'cost' => 2,

0 commit comments

Comments
 (0)