Skip to content

Commit 4dbbb00

Browse files
committed
chore: fix run rector
1 parent 379154e commit 4dbbb00

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

rector.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
3737
use Rector\PHPUnit\CodeQuality\Rector\Class_\RemoveDataProviderParamKeysRector;
3838
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
39+
use Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector;
3940
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
4041
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
4142
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
@@ -172,6 +173,11 @@
172173

173174
// needs separate PR for activation to allow more depth review
174175
FunctionLikeToFirstClassCallableRector::class,
176+
177+
AssertFuncCallToPHPUnitAssertRector::class => [
178+
// use $this inside static closure
179+
__DIR__ . '/tests/system/AutoReview/FrameworkCodeTest.php',
180+
],
175181
])
176182
// auto import fully qualified class names
177183
->withImportNames(removeUnusedImports: true)

tests/system/AutoReview/FrameworkCodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function testEachTestClassHasCorrectGroupAttributeName(string $class): vo
6262
$unrecognizedGroups = array_diff(
6363
array_map(static function (ReflectionAttribute $attribute): string {
6464
$groupAttribute = $attribute->newInstance();
65-
$this->assertInstanceOf(Group::class, $groupAttribute);
65+
assert($groupAttribute instanceof Group);
6666

6767
return $groupAttribute->name();
6868
}, $attributes),

0 commit comments

Comments
 (0)