@param \PHPMD\Node\MethodNode $method

@return bool
163662
protected function isMethodDeprecated(MethodNode $method)
    {
        return (bool)preg_match($this->regexp, $method->getNode()->getDocComment());
    }
1363535
public function methodIsCallable($method)
    {
        return ! $this->methodIsBlacklisted($method) &&
            method_exists($this, $method) &&
            ! method_exists(ModelFilter::class, $method);
    }
1302976
protected function hasMethodAnnotation($method, $annotation)
	{
		if (!$this->getReflection()->hasMethod($method))
		{
			return FALSE;
		}

		$rm = Method::from($this->getReflection()->getName(), $method);
		return $rm->hasAnnotation($annotation);
	}
658720
protected function applyPropelQueryConstNameRule(MethodNode $methodNode): void
    {
        $constant = $methodNode->getFirstChildOfType('ConstantPostfix');

        if ($this->isPropelQueryConstant($constant->getName())) {
            return;
        }

        $this->addViolationMessage($methodNode);
    }
230323
public final function isAllowedRequestMethod(string $method): bool
    {
        return $this->allowedRequestMethods == null || in_array($method, (array) $this->allowedRequestMethods);
    }
289206
public function iSendARequest($method, TableNode $params)
    {
        $id = $this->getRequestId() ? $this->getRequestId() : uniqid();

        $params = $params->getRowsHash();
        $requestParameters = [];

        foreach ($params as $parameterKey => $parameterValue) {
            $property = new PropertyPath($parameterKey);
            $propertyElements = $property->getElements();

            $activeKeyReference = &$requestParameters;

            while (null !== $propertyElement = array_shift($propertyElements)) {
                if (!isset($activeKeyReference[$propertyElement])) {
                    $activeKeyReference[$propertyElement] = []; // Force set array value
                }

                $activeKeyReference = &$activeKeyReference[$propertyElement];
            }

            if (preg_match('/^@\[([^\]]+)?\]$/', trim($parameterValue), $parts)) {
                if (!empty($parts[1])) {
                    $elements = explode(',', $parts[1]);
                    $elements = array_map('trim', $elements);
                } else {
                    // Empty string
                    $elements = [];
                }

                $parameterValue = $elements;
            }

            $activeKeyReference = $parameterValue;
        }

        /** @var \Graze\GuzzleHttp\JsonRpc\Message\RequestInterface $request */
        $request = $this->client->request($id, $method, $requestParameters);

        foreach ($this->headers as $headerName => $headerValue) {
            $request = $request->withHeader($headerName, $headerValue);
        }

        $uri = $request->getUri();
        $uri = $uri->withPath($uri->getPath() . $this->path);
        $request = $request->withUri($uri);

        $this->request = $request;

        $this->sendRequest();
    }
800350
public function hasMethod( $methodName, $callableOnly = TRUE )
	{
		if( $callableOnly )
			return method_exists( $this, $methodName ) && is_callable( array( $this, $methodName ) );
		else
			return method_exists( $this, $methodName );
	}
1250631
protected function applyPropelQueryMethodNameRule(MethodNode $method): void
    {
        $methodName = $method->getName();

        if (preg_match(static::PATTERN_PROPEL_QUERY_DEPENDENCY_PROVIDER_METHOD_NAME, $methodName) !== 0) {
            return;
        }

        $this->addViolationMessage($method);
    }
721242
public function hasPublicMethod(string $method)
    {
        if(! method_exists($this, $method)) return false;

        $reflection = new \ReflectionMethod($this, $method);
        if(! $reflection->isPublic()) return false;

        return true;
    }
821451
def is_method(self, node):
        """"""
        node = node.parent
        while node is not None:
            if node.type == syms.classdef:
                return True
            if node.type == syms.funcdef:
                return False
            node = node.parent
        return False
357073
private static function validate_method( $method ) {

		if ( $method && isset( $method[0] ) && isset( $method[1] ) ) {
			if ( method_exists( $method[0], $method[1] ) ) {
				return true;
			}
		}

		return false;
	}
849562
protected function applyRule(MethodNode $method, array $allowedProvideMethodNames)
    {
        if ($this->isMethodDeprecated($method)) {
            return;
        }

        if (in_array($method->getName(), $allowedProvideMethodNames)) {
            return;
        }

        if (preg_match('/^(add|get).+/', $method->getName()) !== 0) {
            return;
        }

        $this->addViolationMessage($method);
    }
1096262
public static function isMethod($method = null) {
		return isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) == strtolower(trim($method)) : false;
	}
289719
protected function isParentCall(MethodNode $method)
    {
        $primaryPrefixes = $method->findChildrenOfType('MemberPrimaryPrefix');
        if (count($primaryPrefixes) < 1) {
            return false;
        }

        $firstPrimaryPrefix = $primaryPrefixes[0];
        return $firstPrimaryPrefix->getChild(0)->getName() === 'parent';
    }
455559
public function is($method) {
        $m = strtolower($method);
        if ( ($m == 'post' || $m == 'ajax') && $this->_method == 'ajax-post') {
            return TRUE;
        }
        return $m == $this->_method;
    }
1282527
protected function checkForbiddenStatement(MethodNode $method, ASTNode $statement)
    {
        if (in_array(strtolower($statement->getImage()), $this->forbiddenLogicStatements)) {
            $this->createViolation($method, $statement->getImage());
        }
    }
409828
protected function createViolation(MethodNode $method, $statementName)
    {
        $message = sprintf(
            'The method %s contains a "%s" statement which violates the rule "%s"',
            $method->getFullQualifiedName(),
            $statementName,
            static::RULE
        );

        $this->addViolation($method, [$message]);
    }