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)) {