From 02ecfd7a9b2e87cb7098bf8b01743109ebd5c715 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 27 Feb 2024 11:14:53 +0800 Subject: [PATCH] * Modify return value type. --- lib/zin/zentao/bind.class.php | 8 ++++---- lib/zin/zentao/zentao.func.php | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/zin/zentao/bind.class.php b/lib/zin/zentao/bind.class.php index 830e125745..18f2cdc7c8 100644 --- a/lib/zin/zentao/bind.class.php +++ b/lib/zin/zentao/bind.class.php @@ -25,12 +25,12 @@ class bind /** * Bind event by magic __callStatic, the method name as the event name. * - * @param string $name - * @param array $args - * @return directive + * @param string $name + * @param array $args + * @return directive|set * @access public */ - public static function __callStatic(string $name, array $args): directive + public static function __callStatic(string $name, array $args): directive|set { list($callback, $others) = array_merge($args, array(array())); return bind($name, $callback, $others); diff --git a/lib/zin/zentao/zentao.func.php b/lib/zin/zentao/zentao.func.php index 313acf53a3..a45b001765 100644 --- a/lib/zin/zentao/zentao.func.php +++ b/lib/zin/zentao/zentao.func.php @@ -102,8 +102,9 @@ function isAjaxRequest(?string $type = null): bool * @param string $name * @param bool|string|array $callback * @param array $options + * @return directive|set */ -function bind(string $name, bool|string|array $callback, array|string $options = null): directive +function bind(string $name, bool|string|array $callback, array|string $options = null): directive|set { if(is_string($options) && is_string($callback)) {