Exemplo n.º 1
0
 /**
  * Create annotations from the tokenized input string.
  *
  * @return AnnotationList A list of annotation instances or an empty list if no annotation was found.
  */
 private function getAnnotations()
 {
     $annotations = new AnnotationList(array());
     while (($annotation = $this->getAnnotation()) !== null) {
         $annotations->addAnnotation($annotation);
     }
     return $annotations;
 }
Exemplo n.º 2
0
 /**
  * Test if the method `hasAnnotations` returns false on not existing annotation.
  */
 public function testIfHasAnnotationsReturnsFalse()
 {
     $list = new AnnotationList();
     $result = $list->hasAnnotations('NotExisting');
     $this->assertFalse($result);
 }