original_string: public function validateDocBlocks($data)
      {
          /** @var \phpDocumentor\Reflection\BaseReflector $element */
          $element = $data->getSubject();
  
          /** @var \phpDocumentor\Reflection\DocBlock $docblock */
          $docblock = $data->getDocblock();
  
          // get the type of element
          $type = substr(
              get_class($element),
              strrpos(get_class($element), '\\') + 1,
              -9 // Reflector
          );
  
          // no docblock, or docblock should be ignored, so no reason to validate
          if ($docblock && $docblock->hasTag('ignore')) {
              return;
          }
  
          $validatorOptions = $this->loadConfiguration();
  
          foreach (array('Deprecated', 'Required', $type) as $validator) {
  
              // todo: move to a factory or builder class
              $class = 'phpDocumentor\Plugin\Core\Parser\DocBlock\Validator\\' . $validator . 'Validator';
              if (class_exists($class)) {
                  /** @var ValidatorAbstract $val */
                  $val = new $class($element->getName(), $docblock, $element);
                  $val->setOptions($validatorOptions);
                  $val->isValid($element);
              }
          }
      }
code: public function validateDocBlocks($data)
      {
          /** @var \phpDocumentor\Reflection\BaseReflector $element */
          $element = $data->getSubject();
  
          /** @var \phpDocumentor\Reflection\DocBlock $docblock */
          $docblock = $data->getDocblock();
  
          // get the type of element
          $type = substr(
              get_class($element),
              strrpos(get_class($element), '\\') + 1,
              -9 // Reflector
          );
  
          // no docblock, or docblock should be ignored, so no reason to validate
          if ($docblock && $docblock->hasTag('ignore')) {
              return;
          }
  
          $validatorOptions = $this->loadConfiguration();
  
          foreach (array('Deprecated', 'Required', $type) as $validator) {
  
              // todo: move to a factory or builder class
              $class = 'phpDocumentor\Plugin\Core\Parser\DocBlock\Validator\\' . $validator . 'Validator';
              if (class_exists($class)) {
                  /** @var ValidatorAbstract $val */
                  $val = new $class($element->getName(), $docblock, $element);
                  $val->setOptions($validatorOptions);
                  $val->isValid($element);
              }
          }
      }
code_tokens: public function validateDocBlocks ( $ data ) { /** @var \phpDocumentor\Reflection\BaseReflector $element */ $ element = $ data -> getSubject ( ) ; /** @var \phpDocumentor\Reflection\DocBlock $docblock */ $ docblock = $ data -> getDocblock ( ) ; // get the type of element $ type = substr ( get_class ( $ element ) , strrpos ( get_class ( $ element ) , '\\' ) + 1 , - 9 // Reflector ) ; // no docblock, or docblock should be ignored, so no reason to validate if ( $ docblock && $ docblock -> hasTag ( 'ignore' ) ) { return ; } $ validatorOptions = $ this -> loadConfiguration ( ) ; foreach ( array ( 'Deprecated' , 'Required' , $ type ) as $ validator ) { // todo: move to a factory or builder class $ class = 'phpDocumentor\Plugin\Core\Parser\DocBlock\Validator\\' . $ validator . 'Validator' ; if ( class_exists ( $ class ) ) { /** @var ValidatorAbstract $val */ $ val = new $ class ( $ element -> getName ( ) , $ docblock , $ element ) ; $ val -> setOptions ( $ validatorOptions ) ; $ val -> isValid ( $ element ) ; } } }
docstring: Checks all phpDocumentor whether they match the given rules.
  
  @param PostDocBlockExtractionEvent $data Event object containing the parameters.
  
  @todo convert this method to the new style validators; this method is not invoked anymore
  
  @return void
docstring_tokens: Checks all phpDocumentor whether they match the given rules .