Skip to content

Commit 4329399

Browse files
committed
Merge branch 'feature/squiz-operatorbracket-fix-regression-parent' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 13921de + 37ead6e commit 4329399

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public function process(File $phpcsFile, $stackPtr)
142142
T_THIS,
143143
T_SELF,
144144
T_STATIC,
145+
T_PARENT,
145146
T_OBJECT_OPERATOR,
146147
T_NULLSAFE_OBJECT_OPERATOR,
147148
T_DOUBLE_COLON,

src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,5 @@ match ($a) {
199199
'b', 'c', 'd' => -2,
200200
default => -3,
201201
};
202+
203+
$cntPages = ceil(count($items) / parent::ON_PAGE);

src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc.fixed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,5 @@ match ($a) {
199199
'b', 'c', 'd' => -2,
200200
default => -3,
201201
};
202+
203+
$cntPages = ceil(count($items) / parent::ON_PAGE);

0 commit comments

Comments
 (0)