@@ -43,28 +43,28 @@ protected function applyFix(
4343 continue ;
4444 }
4545
46- $ openParenIndex = $ tokens ->getNextTokenOfKind ($ index , ['( ' ]);
47- if ($ openParenIndex === null ) {
46+ $ openParentIndex = $ tokens ->getNextTokenOfKind ($ index , ['( ' ]);
47+ if ($ openParentIndex === null ) {
4848 continue ;
4949 }
5050
51- $ closeParenIndex = $ tokens ->findBlockEnd (Tokens::BLOCK_TYPE_PARENTHESIS_BRACE , $ openParenIndex );
51+ $ closeParenIndex = $ tokens ->findBlockEnd (Tokens::BLOCK_TYPE_PARENTHESIS_BRACE , $ openParentIndex );
5252
5353 // Count commas to determine parameter count
54- $ paramCount = $ this ->countParameters ($ tokens , $ openParenIndex , $ closeParenIndex );
54+ $ paramCount = $ this ->countParameters ($ tokens , $ openParentIndex , $ closeParenIndex );
5555
5656 // Only process if 2+ parameters
5757 if ($ paramCount < 2 ) {
5858 continue ;
5959 }
6060
6161 // Check if already multiline
62- if ($ this ->isMultiline ($ tokens , $ openParenIndex , $ closeParenIndex )) {
62+ if ($ this ->isMultiline ($ tokens , $ openParentIndex , $ closeParenIndex )) {
6363 continue ;
6464 }
6565
6666 // Apply multiline formatting
67- $ this ->makeMultiline ($ tokens , $ openParenIndex , $ closeParenIndex );
67+ $ this ->makeMultiline ($ tokens , $ openParentIndex , $ closeParenIndex );
6868 }
6969 }
7070
@@ -118,19 +118,19 @@ private function isMultiline(
118118
119119 private function makeMultiline (
120120 Tokens $ tokens ,
121- int $ openParenIndex ,
121+ int $ openParentIndex ,
122122 int $ closeParenIndex
123123 ): void {
124- $ indent = $ this ->detectIndent ($ tokens , $ openParenIndex );
124+ $ indent = $ this ->detectIndent ($ tokens , $ openParentIndex );
125125 $ lineIndent = str_repeat (' ' , 4 ); // 4 spaces for parameters
126126
127127 // Add newline after opening parenthesis
128- $ tokens ->insertAt ($ openParenIndex + 1 , new Token ([T_WHITESPACE , "\n" . $ indent . $ lineIndent ]));
128+ $ tokens ->insertAt ($ openParentIndex + 1 , new Token ([T_WHITESPACE , "\n" . $ indent . $ lineIndent ]));
129129 ++$ closeParenIndex ;
130130
131131 // Find all commas and add newlines after them
132132 $ depth = 0 ;
133- for ($ i = $ openParenIndex + 1 ; $ i < $ closeParenIndex ; ++$ i ) {
133+ for ($ i = $ openParentIndex + 1 ; $ i < $ closeParenIndex ; ++$ i ) {
134134 if ($ tokens [$ i ]->equals ('( ' ) || $ tokens [$ i ]->equals ('[ ' )) {
135135 ++$ depth ;
136136 } elseif ($ tokens [$ i ]->equals (') ' ) || $ tokens [$ i ]->equals ('] ' )) {
@@ -145,7 +145,7 @@ private function makeMultiline(
145145
146146 // Insert newline with proper indentation
147147 $ tokens ->insertAt ($ i + 1 , new Token ([T_WHITESPACE , "\n" . $ indent . $ lineIndent ]));
148- $ closeParenIndex = $ tokens ->findBlockEnd (Tokens::BLOCK_TYPE_PARENTHESIS_BRACE , $ openParenIndex );
148+ $ closeParenIndex = $ tokens ->findBlockEnd (Tokens::BLOCK_TYPE_PARENTHESIS_BRACE , $ openParentIndex );
149149 }
150150 }
151151
0 commit comments