Skip to content

Commit d6ba230

Browse files
authored
Merge pull request #38 from kenjis/update-rector
chore: update rector.php from devkit
2 parents 1482353 + 85d0ed0 commit d6ba230

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/rector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ jobs:
6262
6363
- name: Analyze for refactoring
6464
run: |
65-
composer global require --dev rector/rector:^0.18.12
65+
composer global require --dev rector/rector:^0.19.5
6666
rector process --dry-run --no-progress-bar

rector.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
46
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
57
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
@@ -19,7 +21,6 @@
1921
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
2022
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
2123
use Rector\Config\RectorConfig;
22-
use Rector\Core\ValueObject\PhpVersion;
2324
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
2425
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
2526
use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
@@ -28,14 +29,17 @@
2829
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
2930
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
3031
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
32+
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector;
3133
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DataProviderAnnotationToAttributeRector;
34+
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
3235
use Rector\PHPUnit\Set\PHPUnitSetList;
3336
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
3437
use Rector\Set\ValueObject\LevelSetList;
3538
use Rector\Set\ValueObject\SetList;
3639
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
3740
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
3841
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
42+
use Rector\ValueObject\PhpVersion;
3943

4044
return static function (RectorConfig $rectorConfig): void {
4145
$rectorConfig->sets([
@@ -80,9 +84,11 @@
8084

8185
JsonThrowOnErrorRector::class,
8286
StringifyStrNeedlesRector::class,
87+
YieldDataProviderRector::class,
8388

8489
// Note: requires php 8
8590
RemoveUnusedPromotedPropertyRector::class,
91+
AnnotationWithValueToAttributeRector::class,
8692

8793
// May load view files directly when detecting classes
8894
StringClassNameToClassConstantRector::class,
@@ -120,7 +126,9 @@
120126
$rectorConfig
121127
->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [
122128
/**
123-
* The INLINE_PUBLIC value is default to false to avoid BC break, if you use for libraries and want to preserve BC break, you don't need to configure it, as it included in LevelSetList::UP_TO_PHP_74
129+
* The INLINE_PUBLIC value is default to false to avoid BC break,
130+
* if you use for libraries and want to preserve BC break, you don't
131+
* need to configure it, as it included in LevelSetList::UP_TO_PHP_74
124132
* Set to true for projects that allow BC break
125133
*/
126134
TypedPropertyFromAssignsRector::INLINE_PUBLIC => false,

0 commit comments

Comments
 (0)