Esempio n. 1
0
 public function testUnanotatedClassCanHaveAnotatedField()
 {
     $reflection = new ReflectionClass('SomeOtherClass');
     $property = $reflection->getProperty('field1');
     $finder = new DocComment();
     $this->assertEqual($finder->get($property), '/** field doccomment */');
 }
Esempio n. 2
0
 public static function getDocComment($reflection)
 {
     if (self::checkRawDocCommentParsingNeeded()) {
         $docComment = new DocComment();
         return $docComment->get($reflection);
     }
     return $reflection->getDocComment();
 }
Esempio n. 3
0
 public static function getDocComment($reflection)
 {
     $value = false;
     if (self::checkRawDocCommentParsingNeeded()) {
         $docComment = new DocComment();
         $value = $docComment->get($reflection);
     } else {
         $value = $reflection->getDocComment();
     }
     if ($value) {
         // get rid of useless '*' and white space from line's start
         // this will allow dividing of one annotation to multiple lines
         $value = preg_replace('/^[\\s*]*/m', '', $value);
     }
     return $value;
 }