Skip to content

Commit b52a018

Browse files
committed
Merge branch 'php-8.0/squiz-scopeclosingbrace-support-match' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 436a610 + d2872c1 commit b52a018

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,10 @@ public function foo()
107107
}
108108

109109
$fn1 = fn($x) => $x + $y;
110+
111+
$match = match ($test) { 1 => 'a', 2 => 'b' };
112+
113+
$match = match ($test) {
114+
1 => 'a',
115+
2 => 'b'
116+
};

src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,11 @@ public function foo()
108108
}
109109

110110
$fn1 = fn($x) => $x + $y;
111+
112+
$match = match ($test) { 1 => 'a', 2 => 'b'
113+
};
114+
115+
$match = match ($test) {
116+
1 => 'a',
117+
2 => 'b'
118+
};

src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public function getErrorList()
3131
24 => 1,
3232
80 => 1,
3333
102 => 1,
34+
111 => 1,
35+
116 => 1,
3436
];
3537

3638
}//end getErrorList()

0 commit comments

Comments
 (0)