Skip to content

Commit

Permalink
Use [... ] instead of array_merge#
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed Oct 7, 2024
1 parent 9722108 commit 717f872
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extra/html-extra/HtmlExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ public static function htmlAttrMerge(...$arrays): array
$value = (array) $value;
}

$result[$deepMergeKey] = array_merge($result[$deepMergeKey] ?? [], $value);
$result[$deepMergeKey] = [...$result[$deepMergeKey] ?? [], ...$value];
}

$result = array_merge($result, $array);
$result = [...$result, ...$array];
}

return $result;
Expand Down

0 comments on commit 717f872

Please sign in to comment.