Skip to content

Commit 46ece10

Browse files
Merge pull request #56 from VincentLanglet/fix
🐛 Some fix
2 parents cf5ec05 + 2a41a45 commit 46ece10

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

SymfonyCustom/Sniffs/Arrays/ArrayDeclarationSniff.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,9 @@ public function processMultiLineArray(File $phpcsFile, $stackPtr, $arrayStart, $
337337
$nextToken = $tokens[$nextToken]['scope_closer'];
338338
continue;
339339
case T_OPEN_PARENTHESIS:
340-
$parenthesisOwner = $tokens[$nextToken]['parenthesis_owner'];
341-
if (false === isset($parenthesisOwner) || $parenthesisOwner !== $stackPtr) {
340+
if (false === isset($tokens[$nextToken]['parenthesis_owner'])
341+
|| $tokens[$nextToken]['parenthesis_owner'] !== $stackPtr
342+
) {
342343
$nextToken = $tokens[$nextToken]['parenthesis_closer'];
343344
continue;
344345
}

SymfonyCustom/Sniffs/Objects/ObjectInstantiationSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public function process(File $phpcsFile, $stackPtr)
3939
T_VARIABLE,
4040
T_STATIC,
4141
T_SELF,
42+
T_OPEN_SQUARE_BRACKET,
43+
T_CLOSE_SQUARE_BRACKET,
4244
];
4345

4446
$object = $stackPtr;

0 commit comments

Comments
 (0)