Skip to content

Commit 52ff1a9

Browse files
committed
ci+rector rules
1 parent 14a7930 commit 52ff1a9

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
php-version: [
2020
'8.2',
2121
'8.3',
22+
'8.4'
2223
]
2324

2425
steps:

rector.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@
1313
__DIR__ . '/src',
1414
__DIR__ . '/tests',
1515
])
16+
->withRules([
17+
\Rector\Php84\Rector\Param\ExplicitNullableParamTypeRector::class,
18+
])
1619
->withSets([
1720
JMSSetList::ANNOTATIONS_TO_ATTRIBUTES,
18-
PHPUnitSetList::PHPUNIT_100,
21+
PHPUnitSetList::PHPUNIT_110,
1922
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
2023
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
2124
SetList::TYPE_DECLARATION,
2225
SetList::CODE_QUALITY,
2326
SetList::CODING_STYLE,
2427
SetList::DEAD_CODE,
25-
SetList::PHP_82,
28+
\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_84,
2629
SetList::PRIVATIZATION,
2730
SetList::EARLY_RETURN,
2831
SetList::INSTANCEOF,
@@ -33,9 +36,10 @@
3336
\Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector::class,
3437
//allow to use promoted properties that only purpose is to get serialized
3538
\Rector\DeadCode\Rector\ClassMethod\RemoveEmptyClassMethodRector::class,
36-
//this is stupid and makes code unreadable
39+
//this makes code unreadable
3740
\Rector\Strict\Rector\Ternary\BooleanInTernaryOperatorRuleFixerRector::class,
38-
\Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector::class
41+
\Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector::class,
42+
\Rector\Php81\Rector\Property\ReadOnlyPropertyRector::class,
3943
])
4044
->withFileExtensions(['php'])
4145
->withCache(

src/CXml/Model/Tax.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class Tax
1111
{
1212
#[Serializer\SerializedName('Money')]
13-
private Money $money;
13+
private readonly Money $money;
1414

1515
/**
1616
* @var TaxDetail[]
@@ -24,7 +24,7 @@ public function __construct(
2424
int $value,
2525
#[Serializer\SerializedName('Description')]
2626
#[Serializer\XmlElement(cdata: false)]
27-
private MultilanguageString $description,
27+
private readonly MultilanguageString $description,
2828
) {
2929
$this->money = new Money($currency, $value);
3030
}

0 commit comments

Comments
 (0)