From 7004381112a5a1a91523895b889f06c72fb2d649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20Lajos?= Date: Sun, 25 Jul 2021 02:21:03 +0200 Subject: [PATCH] Fixed mixed up A::append() and A::prepend() --- src/A.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/A.php b/src/A.php index f7f3823..d8c62ce 100644 --- a/src/A.php +++ b/src/A.php @@ -108,13 +108,13 @@ public static function ensureArray($data): array // A::append([4, 5, 6], [1, 2]) -> [1, 2, 4, 5, 6] public static function append($value, array $data): array { - return self::concat($data, $value); + return self::concat($value, $data); } // A::prepend([4, 5, 6], [1, 2]) -> [4, 5, 6, 1, 2] public static function prepend($value, array $data): array { - return self::concat($value, $data); + return self::concat($data, $value); } // A::pluck('color', [['color' => 'red', ...], ['color' => 'green', ...]]) -> ['red', 'green']