PhpCsFixer\DocBlock\Annotation::getEnd PHP Méthode

getEnd() public méthode

Get the end position of this annotation.
public getEnd ( ) : integer
Résultat integer
    public function getEnd()
    {
        return $this->end;
    }

Usage Example

 /**
  * Get this docblock's annotations.
  *
  * @return Annotation[]
  */
 public function getAnnotations()
 {
     if (null === $this->annotations) {
         $this->annotations = array();
         $total = count($this->lines);
         for ($index = 0; $index < $total; ++$index) {
             if ($this->lines[$index]->containsATag()) {
                 // get all the lines that make up the annotation
                 $lines = array_slice($this->lines, $index, $this->findAnnotationLength($index), true);
                 $annotation = new Annotation($lines);
                 // move the index to the end of the annotation to avoid
                 // checking it again because we know the lines inside the
                 // current annotation cannot be part of another annotation
                 $index = $annotation->getEnd();
                 // add the current annotation to the list of annotations
                 $this->annotations[] = $annotation;
             }
         }
     }
     return $this->annotations;
 }
All Usage Examples Of PhpCsFixer\DocBlock\Annotation::getEnd