* Modify return value type.

This commit is contained in:
liumengyi
2024-02-27 11:14:53 +08:00
parent 5bfad26726
commit 02ecfd7a9b
2 changed files with 6 additions and 5 deletions
+4 -4
View File
@@ -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);
+2 -1
View File
@@ -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))
{