Skip to content

Commit 0561a63

Browse files
committed
chore: add rector rules
From devkit.
1 parent 6668d6c commit 0561a63

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rector.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@
3838
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
3939
use Rector\Set\ValueObject\LevelSetList;
4040
use Rector\Set\ValueObject\SetList;
41+
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
4142

4243
return static function (RectorConfig $rectorConfig): void {
4344
$rectorConfig->sets([
4445
SetList::DEAD_CODE,
4546
LevelSetList::UP_TO_PHP_74,
4647
PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD,
47-
PHPUnitSetList::PHPUNIT_80,
48+
PHPUnitSetList::PHPUNIT_100,
4849
]);
4950

5051
$rectorConfig->parallel();
@@ -132,6 +133,11 @@
132133
$rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class);
133134
$rectorConfig->rule(SimplifyEmptyArrayCheckRector::class);
134135
$rectorConfig->rule(NormalizeNamespaceByPSR4ComposerAutoloadRector::class);
136+
$rectorConfig
137+
->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [
138+
// Set to false if you use in libraries, or it does create breaking changes.
139+
TypedPropertyFromAssignsRector::INLINE_PUBLIC => false,
140+
]);
135141
$rectorConfig->rule(StringClassNameToClassConstantRector::class);
136142
$rectorConfig->rule(PrivatizeFinalClassPropertyRector::class);
137143
$rectorConfig->rule(CompleteDynamicPropertiesRector::class);

0 commit comments

Comments
 (0)