public static function hasMethod(string $method, $objectOrClass): bool
    {
        try {
            $reflectionClass = self::getReflectionClass($objectOrClass);
            return $reflectionClass->hasMethod($method);
        } catch (Exception $e) {
            return false;
        }
    }
public static function hasMethod(string $method, $objectOrClass): bool
    {
        try {
            $reflectionClass = self::getReflectionClass($objectOrClass);
            return $reflectionClass->hasMethod($method);
        } catch (Exception $e) {
            return false;
        }
    }
public static function hasMethod ( string $ method , $ objectOrClass ) : bool { try { $ reflectionClass = self :: getReflectionClass ( $ objectOrClass ) ; return $ reflectionClass -> hasMethod ( $ method ) ; } catch ( Exception $ e ) { return false ; } }
Has method.

@param string $method
@param object|string $objectOrClass
@return bool
Has method .