Skip to content

Commit fbf3d8f

Browse files
committed
Cleanup
1 parent 8ad16f6 commit fbf3d8f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

SlevomatCodingStandard/Sniffs/Classes/PropertyDeclarationSniff.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,12 @@ private function checkModifiersOrder(File $phpcsFile, int $propertyPointer, int
118118
$propertyPointer
119119
);
120120

121-
$modifiersGroups = $this->getNormalizedModifiersOrder();
122-
123121
if (count($modifiersPointers) < 2) {
124122
return;
125123
}
126124

127125
$tokens = $phpcsFile->getTokens();
126+
$modifiersGroups = $this->getNormalizedModifiersOrder();
128127

129128
$expectedModifiersPositions = [];
130129
foreach ($modifiersPointers as $modifierPointer) {

tests/Sniffs/Classes/data/propertyDeclarationNoErrors.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 8.0
1+
<?php // lint >= 8.1
22

33
class Whatever
44
{
@@ -25,6 +25,8 @@ public function whatever()
2525

2626
private false|int $unionWithFalse = false;
2727

28+
public readonly bool $readonly;
29+
2830
public function __construct(private int $propertyPromotion)
2931
{
3032
}

0 commit comments

Comments
 (0)