File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ protected function applyFix(
4444 }
4545
4646 $ openParenIndex = $ tokens ->getNextTokenOfKind ($ index , ['( ' ]);
47+ if ($ openParenIndex === null ) {
48+ continue ;
49+ }
50+
4751 $ closeParenIndex = $ tokens ->findBlockEnd (Tokens::BLOCK_TYPE_PARENTHESIS_BRACE , $ openParenIndex );
4852
4953 // Count commas to determine parameter count
@@ -150,7 +154,7 @@ private function makeMultiline(
150154
151155 // Handle the opening brace
152156 $ nextNonWhitespace = $ tokens ->getNextNonWhitespace ($ closeParenIndex );
153- if ($ nextNonWhitespace !== null && $ tokens [$ nextNonWhitespace ]->equals (T_CURLY_OPEN )) {
157+ if ($ nextNonWhitespace !== null && $ tokens [$ nextNonWhitespace ]->equals (' { ' )) {
154158 $ tokens ->ensureWhitespaceAtIndex ($ nextNonWhitespace - 1 , 1 , ' ' );
155159 }
156160 }
You can’t perform that action at this time.
0 commit comments