original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Returns an error if the given Reflector's arguments do not match expectations.
  
  @param FunctionReflector $element
  
  @return Error|null
docstring_tokens: Returns an error if the given Reflector s arguments do not match expectations .