コード例 #1
0
ファイル: AnnotationParser.php プロジェクト: mohiva/common
 /**
  * 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;
 }
コード例 #2
0
ファイル: AnnotationListTest.php プロジェクト: mohiva/common
 /**
  * Test if the method `hasAnnotations` returns false on not existing annotation.
  */
 public function testIfHasAnnotationsReturnsFalse()
 {
     $list = new AnnotationList();
     $result = $list->hasAnnotations('NotExisting');
     $this->assertFalse($result);
 }