public function isValid(string $method = null): bool
    {
        if ($method === null) {
            $method = $this->getMethod();
        }
        return $this->isEnabled() && $this->methodIsCallable($method);
    }
public function isValid(string $method = null): bool
    {
        if ($method === null) {
            $method = $this->getMethod();
        }
        return $this->isEnabled() && $this->methodIsCallable($method);
    }
public function isValid ( string $ method = null ) : bool { if ( $ method === null ) { $ method = $ this -> getMethod ( ) ; } return $ this -> isEnabled ( ) && $ this -> methodIsCallable ( $ method ) ; }
Checks the given method and determines if it passed the black and white lists and can be called.

@param string $method
@return bool
Checks the given method and determines if it passed the black and white lists and can be called .