* Modify return value type.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user