Skip to content

Commit

Permalink
Merge pull request #7310 from weirdan/rector-ListToArrayDestructRector
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Jan 5, 2022
2 parents b8240e2 + e4c16c1 commit 17793d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions phpcs.xml
Expand Up @@ -216,4 +216,10 @@
<property name="enable" value="true"/>
</properties>
</rule>

<!--
Enforces using short form of list syntax, [...] instead of list(...).
https://github.com/slevomat/coding-standard/#slevomatcodingstandardphpshortlist-
-->
<rule ref="SlevomatCodingStandard.PHP.ShortList"/>
</ruleset>
2 changes: 1 addition & 1 deletion src/Psalm/Internal/PhpTraverser/CustomTraverser.php
Expand Up @@ -164,7 +164,7 @@ protected function traverseArray(array $nodes): array
}

if (!empty($doNodes)) {
while (list($i, $replace) = array_pop($doNodes)) {
while ([$i, $replace] = array_pop($doNodes)) {
array_splice($nodes, $i, 1, $replace);
}
}
Expand Down

0 comments on commit 17793d1

Please sign in to comment.