From ee8fc386b244dcaa876a4ee2de2e922617de4c3d Mon Sep 17 00:00:00 2001 From: devosc Date: Sat, 22 Feb 2020 10:56:25 -0600 Subject: [PATCH] remove array_merge --- src/Dashboard/Add/Respond.php | 2 +- src/Dashboard/Add/Save.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Dashboard/Add/Respond.php b/src/Dashboard/Add/Respond.php index 26a0c98..fe64742 100644 --- a/src/Dashboard/Add/Respond.php +++ b/src/Dashboard/Add/Respond.php @@ -16,6 +16,6 @@ class Respond */ function __invoke(Response $response, ViewModel $model = null) : ViewModel { - return $model->with(['args' => array_merge([__CLASS__], $model['args'])]); + return $model->with(['args' => [__CLASS__, ...$model['args']]]); } } diff --git a/src/Dashboard/Add/Save.php b/src/Dashboard/Add/Save.php index 9737f71..d1eb78f 100644 --- a/src/Dashboard/Add/Save.php +++ b/src/Dashboard/Add/Save.php @@ -13,6 +13,6 @@ class Save */ function __invoke(ViewModel $model) : ViewModel { - return $model->with(['args' => array_merge([__CLASS__], $model['args'])]); + return $model->with(['args' => [__CLASS__, ...$model['args']]]); } }