public function testDirectAccessToClassIgnoresStopAnnotation()
 {
     $annotations = Annotations::ofClass('FirstClass', '@note');
     $this->check(count($annotations) === 1);
     $this->check($annotations[0]->note === 'class-first');
     $annotations = Annotations::ofProperty('FirstClass', 'prop', '@note');
     $this->check(count($annotations) === 1);
     $this->check($annotations[0]->note === 'prop-first');
     $annotations = Annotations::ofMethod('FirstClass', 'someMethod', '@note');
     $this->check(count($annotations) === 1);
     $this->check($annotations[0]->note === 'method-first');
 }
Exemple #2
0
 private function getMetadata($property, $type, $name, $default = null)
 {
     $a = Annotations::ofProperty(get_class($this->object), $property, $type);
     if (!count($a)) {
         return $default;
     }
     return $a[0]->{$name};
 }