Use array_merge() instead of +=

To avoid overriding items
This commit is contained in:
Pierre Rudloff 2020-10-17 15:09:34 +02:00
parent 83863bd66c
commit 6fc294afbe

View file

@ -53,10 +53,10 @@ abstract class BaseTest extends TestCase
$requires = []; $requires = [];
if (isset($annotations['class']['requires'])) { if (isset($annotations['class']['requires'])) {
$requires += $annotations['class']['requires']; $requires = array_merge($requires, $annotations['class']['requires']);
} }
if (isset($annotations['method']['requires'])) { if (isset($annotations['method']['requires'])) {
$requires += $annotations['method']['requires']; $requires = array_merge($requires, $annotations['method']['requires']);
} }
foreach ($requires as $require) { foreach ($requires as $require) {