protected function validateArguments($element)
    {
        $params = $element->getDocBlock()->getTagsByName('param');
        $arguments = $element->getArguments();

        foreach (array_values($arguments) as $key => $argument) {
            if (!$this->isArgumentInDocBlock($key, $argument, $element, $params)) {
                continue;
            }

            $result = $this->doesArgumentNameMatchParam($params[$key], $argument, $element);
            if ($result) {
                return $result;
            }

            $result = $this->doesArgumentTypehintMatchParam($params[$key], $argument, $element);
            if ($result) {
                return $result;
            }
        }

        /** @var ParamTag $param */
        foreach ($params as $param) {
            $param_name = $param->getVariableName();

            if (isset($arguments[$param_name])) {
                continue;
            }

            return new Error(
                LogLevel::NOTICE,
                'PPC:ERR-50013',
                $element->getLinenumber(),
                array($param_name, $element->getName())
            );
        }

        return null;
    }
protected function validateArguments($element)
    {
        $params = $element->getDocBlock()->getTagsByName('param');
        $arguments = $element->getArguments();

        foreach (array_values($arguments) as $key => $argument) {
            if (!$this->isArgumentInDocBlock($key, $argument, $element, $params)) {
                continue;
            }

            $result = $this->doesArgumentNameMatchParam($params[$key], $argument, $element);
            if ($result) {
                return $result;
            }

            $result = $this->doesArgumentTypehintMatchParam($params[$key], $argument, $element);
            if ($result) {
                return $result;
            }
        }

        /** @var ParamTag $param */
        foreach ($params as $param) {
            $param_name = $param->getVariableName();

            if (isset($arguments[$param_name])) {
                continue;
            }

            return new Error(
                LogLevel::NOTICE,
                'PPC:ERR-50013',
                $element->getLinenumber(),
                array($param_name, $element->getName())
            );
        }

        return null;
    }
protected function validateArguments ( $ element ) { $ params = $ element -> getDocBlock ( ) -> getTagsByName ( 'param' ) ; $ arguments = $ element -> getArguments ( ) ; foreach ( array_values ( $ arguments ) as $ key => $ argument ) { if ( ! $ this -> isArgumentInDocBlock ( $ key , $ argument , $ element , $ params ) ) { continue ; } $ result = $ this -> doesArgumentNameMatchParam ( $ params [ $ key ] , $ argument , $ element ) ; if ( $ result ) { return $ result ; } $ result = $ this -> doesArgumentTypehintMatchParam ( $ params [ $ key ] , $ argument , $ element ) ; if ( $ result ) { return $ result ; } } /** @var ParamTag $param */ foreach ( $ params as $ param ) { $ param_name = $ param -> getVariableName ( ) ; if ( isset ( $ arguments [ $ param_name ] ) ) { continue ; } return new Error ( LogLevel :: NOTICE , 'PPC:ERR-50013' , $ element -> getLinenumber ( ) , array ( $ param_name , $ element -> getName ( ) ) ) ; } return null ; }
Returns an error if the given Reflector's arguments do not match expectations.

@param FunctionReflector $element

@return Error|null
Returns an error if the given Reflector s arguments do not match expectations .