protected function methodAllowsGuests($class, $method)
    {
        try {
            $reflection = new ReflectionClass($class);

            $method = $reflection->getMethod($method);
        } catch (Exception $e) {
            return false;
        }

        if ($method) {
            $parameters = $method->getParameters();

            return isset($parameters[0]) && $this->parameterAllowsGuests($parameters[0]);
        }

        return false;
    }
protected function methodAllowsGuests($class, $method)
    {
        try {
            $reflection = new ReflectionClass($class);

            $method = $reflection->getMethod($method);
        } catch (Exception $e) {
            return false;
        }

        if ($method) {
            $parameters = $method->getParameters();

            return isset($parameters[0]) && $this->parameterAllowsGuests($parameters[0]);
        }

        return false;
    }
protected function methodAllowsGuests ( $ class , $ method ) { try { $ reflection = new ReflectionClass ( $ class ) ; $ method = $ reflection -> getMethod ( $ method ) ; } catch ( Exception $ e ) { return false ; } if ( $ method ) { $ parameters = $ method -> getParameters ( ) ; return isset ( $ parameters [ 0 ] ) && $ this -> parameterAllowsGuests ( $ parameters [ 0 ] ) ; } return false ; }
Determine if the given class method allows guests.

@param  string  $class
@param  string  $method
@return bool
Determine if the given class method allows guests .