Skip to content

Commit 2b06f54

Browse files
authored
Merge pull request #477 from PHPCSStandards/feature/abstractarraydeclaration-minor-tweak
AbstractArrayDeclarationSniff: improve the property reset
2 parents bb9d361 + f327dc3 commit 2b06f54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ final public function process(File $phpcsFile, $stackPtr)
204204
$this->processArray($phpcsFile);
205205

206206
// Reset select properties between calls to this sniff to lower memory usage.
207-
unset($this->tokens, $this->arrayItems);
207+
$this->tokens = [];
208+
$this->arrayItems = [];
208209
}
209210

210211
/**

0 commit comments

Comments
 (0)