From 771834e102cd3c81f4ed0d73fba16783b2c12d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Jac=C3=ADk?= Date: Sun, 10 Jan 2021 15:49:52 +0100 Subject: [PATCH] Fixee insertBefore and insertAfter doc comment Function `insertBefore` inserts at the beginning and `insertAfter` at the end, when `$key` is `null`. Doc comments was reversed. --- src/Utils/Arrays.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Utils/Arrays.php b/src/Utils/Arrays.php index ffbb7cb0e..7f2b106fb 100644 --- a/src/Utils/Arrays.php +++ b/src/Utils/Arrays.php @@ -101,7 +101,7 @@ public static function searchKey(array $array, $key): ?int /** * Inserts the contents of the $inserted array into the $array immediately after the $key. - * If $key is null (or does not exist), it is inserted at the end. + * If $key is null (or does not exist), it is inserted at the beginning. * @param string|int|null $key */ public static function insertBefore(array &$array, $key, array $inserted): void @@ -115,7 +115,7 @@ public static function insertBefore(array &$array, $key, array $inserted): void /** * Inserts the contents of the $inserted array into the $array before the $key. - * If $key is null (or does not exist), it is inserted at the beginning. + * If $key is null (or does not exist), it is inserted at the end. * @param string|int|null $key */ public static function insertAfter(array &$array, $key, array $inserted): void