PhpCsFixer\DocBlock\Annotation::getStart PHP Method

getStart() public method

Get the start position of this annotation.
public getStart ( ) : integer
return integer
    public function getStart()
    {
        return $this->start;
    }

Usage Example

 /**
  * Remove return void or return null annotations..
  *
  * @param DocBlock   $doc
  * @param Annotation $annotation
  */
 private function fixAnnotation(DocBlock $doc, Annotation $annotation)
 {
     if (1 === preg_match('/@return\\s+(void|null)(?!\\|)/', $doc->getLine($annotation->getStart())->getContent())) {
         $annotation->remove();
     }
 }
All Usage Examples Of PhpCsFixer\DocBlock\Annotation::getStart