mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Expand abnormally used ternary operator to if
This commit is contained in:
@ -120,7 +120,11 @@ class BaseArrayHelper
|
||||
$next = array_shift($args);
|
||||
foreach ($next as $k => $v) {
|
||||
if (is_integer($k)) {
|
||||
isset($res[$k]) ? $res[] = $v : $res[$k] = $v;
|
||||
if (isset($res[$k])) {
|
||||
$res[] = $v;
|
||||
} else {
|
||||
$res[$k] = $v;
|
||||
}
|
||||
} elseif (is_array($v) && isset($res[$k]) && is_array($res[$k])) {
|
||||
$res[$k] = self::merge($res[$k], $v);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user