src/Policy.php
protected function addCheck($name, $type, $args)
    {
        $func = $type.'Check';

        if (method_exists($this, $func)) {
            $type = strtolower(str_replace($type, '', $name));
            $this->$func($type, $name, $args);
        } else {
          throw new \InvalidArgumentException('Invalid check type: '.$type);
        }
    }
protected function addCheck($name, $type, $args)
    {
        $func = $type.'Check';

        if (method_exists($this, $func)) {
            $type = strtolower(str_replace($type, '', $name));
            $this->$func($type, $name, $args);
        } else {
          throw new \InvalidArgumentException('Invalid check type: '.$type);
        }
    }
protected function addCheck ( $ name , $ type , $ args ) { $ func = $ type . 'Check' ; if ( method_exists ( $ this , $ func ) ) { $ type = strtolower ( str_replace ( $ type , '' , $ name ) ) ; $ this -> $ func ( $ type , $ name , $ args ) ; } else { throw new \ InvalidArgumentException ( 'Invalid check type: ' . $ type ) ; } }
Add a new check to the set

@param string $name Function name
@param string $type Check type
@param array $args Check arguments
@throws \InvalidArgumentException If check type is invalid
Add a new check to the set