From 75362d9896e0deb8163dee2a9bd4bb989f6128a8 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 10 Jun 2025 15:55:40 +0800 Subject: [PATCH] * [refac,done,0.1h] remove unused method. --- framework/api/helper.class.php | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/framework/api/helper.class.php b/framework/api/helper.class.php index 36ba813226..78ce2abe58 100644 --- a/framework/api/helper.class.php +++ b/framework/api/helper.class.php @@ -317,34 +317,6 @@ function formatTime(string|null $time, string $format = ''): string return trim($time); } -/** - * 把一个或多个数组附加到第一个数组,用于替换数组 + 运算符。 - * Append one or more arrays to the first array, used to replace the array + operator. - * - * reference: https://www.php.net/manual/en/language.operators.array.php. - * - * @param array ...$args - * @return array - */ -function arrayUnion(...$args): array -{ - $args = array_filter($args, function($arg){return is_array($arg);}); - - $count = count($args); - if($count == 0) return []; - if($count == 1) return reset($args); - - $result = array_shift($args); - foreach($args as $arg) - { - foreach($arg as $key => $value) - { - if(!isset($result[$key])) $result[$key] = $value; - } - } - return $result; -} - /** * Fix for session error. *