protected function isPotentialRelationMethod(ReflectionMethod $method)
    {
        if (
                ! $method->isPublic()
            // Check if we should ignore the method always
            ||  in_array($method->name, $this->getIgnoredRelationNames())
            // If the method has required parameters, we cannot call or use it
            ||  $method->getNumberOfRequiredParameters()
        ) {
            return false;
        }

        // Don't examine methods defined in certain namespaces
        foreach ($this->mustNotMatchClass as $regEx) {
            if (preg_match($regEx, $method->class)) {
                return false;
            }
        }

        // Don't examine methods defined in certain files
        $file = $method->getFileName();
        foreach ($this->mustNotMatchFile as $regEx) {
            if (preg_match($regEx, $file)) {
                return false;
            }
        }

        return true;
    }