src/Permission.php
public function addRuleCallback($name, Callable $callback)
    {
        if (!is_string($name)) {
            throw new \InvalidArgumentException('Rule must be a string');
        }

        $rule = $this->createRuleCallback($name, $callback);
        $this->addRule($rule);
    }
public function addRuleCallback($name, Callable $callback)
    {
        if (!is_string($name)) {
            throw new \InvalidArgumentException('Rule must be a string');
        }

        $rule = $this->createRuleCallback($name, $callback);
        $this->addRule($rule);
    }
public function addRuleCallback ( $ name , Callable $ callback ) { if ( ! is_string ( $ name ) ) { throw new \ InvalidArgumentException ( 'Rule must be a string' ) ; } $ rule = $ this -> createRuleCallback ( $ name , $ callback ) ; $ this -> addRule ( $ rule ) ; }
Adds a rule callback to the Permission.

@param string $name
@param Callable $callback
@return void
Adds a rule callback to the Permission .