We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7f6fd20 + 30ed54f commit d62e097Copy full SHA for d62e097
Magento2/Sniffs/Performance/ForeachArrayMergeSniff.md
@@ -15,12 +15,11 @@ Typical example when `array_merge` is being used in the loop:
15
16
In order to reduce execution time `array_merge` can be called only once:
17
``` php
18
- $options = [[]];
+ $options = [];
19
foreach ($configurationSources as $source) {
20
// code here
21
$options[] = $source->getOptions();
22
}
23
24
- // PHP 5.6+
25
- $options = array_merge(...$options);
+ $options = array_merge([], ...$options);
26
```
0 commit comments