@@ -79,8 +79,9 @@ public function typeAnnotations($reflect) {
7979 * @return ?string
8080 */
8181 public function typeComment ($ reflect ) {
82- if ($ meta = \xp::$ meta [\xp::$ cn [$ reflect ->name ] ?? strtr ($ reflect ->name , '\\' , '. ' )]['class ' ] ?? null ) {
83- return $ meta [DETAIL_COMMENT ];
82+ $ c = \xp::$ cn [$ reflect ->name ] ?? strtr ($ reflect ->name , '\\' , '. ' );
83+ if ($ meta = \xp::$ meta [$ c ]['class ' ][DETAIL_COMMENT ] ?? null ) {
84+ return $ meta ;
8485 } else if (false === ($ c = $ reflect ->getDocComment ())) {
8586 return null ;
8687 } else {
@@ -114,8 +115,8 @@ public function constantAnnotations($reflect) {
114115 public function constantType ($ reflect ) {
115116 $ name = $ reflect ->getDeclaringClass ()->name ;
116117 $ c = \xp::$ cn [$ name ] ?? strtr ($ name , '\\' , '. ' );
117- if ($ meta = \xp::$ meta [$ c ][2 ][$ reflect ->name ] ?? null ) {
118- return $ meta[ DETAIL_RETURNS ] ;
118+ if ($ meta = \xp::$ meta [$ c ][2 ][$ reflect ->name ][ DETAIL_RETURNS ] ?? null ) {
119+ return $ meta ;
119120 } else {
120121 $ tags = $ this ->tags ($ reflect );
121122 return $ tags ['var ' ][0 ] ?? $ tags ['type ' ][0 ] ?? null ;
@@ -131,8 +132,8 @@ public function constantType($reflect) {
131132 public function constantComment ($ reflect ) {
132133 $ name = $ reflect ->getDeclaringClass ()->name ;
133134 $ c = \xp::$ cn [$ name ] ?? strtr ($ name , '\\' , '. ' );
134- if ($ meta = \xp::$ meta [$ c ][2 ][$ reflect ->name ] ?? null ) {
135- return $ meta[ DETAIL_COMMENT ] ;
135+ if ($ meta = \xp::$ meta [$ c ][2 ][$ reflect ->name ][ DETAIL_COMMENT ] ?? null ) {
136+ return $ meta ;
136137 } else if (false === ($ c = $ reflect ->getDocComment ())) {
137138 return null ;
138139 } else {
@@ -165,8 +166,8 @@ public function propertyAnnotations($reflect) {
165166 public function propertyType ($ reflect ) {
166167 $ name = $ reflect ->getDeclaringClass ()->name ;
167168 $ c = \xp::$ cn [$ name ] ?? strtr ($ name , '\\' , '. ' );
168- if ($ meta = \xp::$ meta [$ c ][0 ][$ reflect ->name ] ?? null ) {
169- return $ meta[ DETAIL_RETURNS ] ;
169+ if ($ meta = \xp::$ meta [$ c ][0 ][$ reflect ->name ][ DETAIL_RETURNS ] ?? null ) {
170+ return $ meta ;
170171 } else {
171172 $ tags = $ this ->tags ($ reflect );
172173 return $ tags ['var ' ][0 ] ?? $ tags ['type ' ][0 ] ?? null ;
@@ -182,8 +183,8 @@ public function propertyType($reflect) {
182183 public function propertyComment ($ reflect ) {
183184 $ name = $ reflect ->getDeclaringClass ()->name ;
184185 $ c = \xp::$ cn [$ name ] ?? strtr ($ name , '\\' , '. ' );
185- if ($ meta = \xp::$ meta [$ c ][0 ][$ reflect ->name ] ?? null ) {
186- return $ meta[ DETAIL_COMMENT ] ;
186+ if ($ meta = \xp::$ meta [$ c ][0 ][$ reflect ->name ][ DETAIL_COMMENT ] ?? null ) {
187+ return $ meta ;
187188 } else if (false === ($ c = $ reflect ->getDocComment ())) {
188189 return null ;
189190 } else {
@@ -215,8 +216,8 @@ public function methodAnnotations($reflect) {
215216 public function methodReturns ($ reflect ) {
216217 $ name = $ reflect ->getDeclaringClass ()->name ;
217218 $ c = \xp::$ cn [$ name ] ?? strtr ($ name , '\\' , '. ' );
218- if ($ meta = \xp::$ meta [$ c ][1 ][$ reflect ->name ] ?? null ) {
219- return $ meta[ DETAIL_RETURNS ] ;
219+ if ($ meta = \xp::$ meta [$ c ][1 ][$ reflect ->name ][ DETAIL_RETURNS ] ?? null ) {
220+ return $ meta ;
220221 } else {
221222 return $ this ->tags ($ reflect )['return ' ][0 ] ?? null ;
222223 }
@@ -231,8 +232,8 @@ public function methodReturns($reflect) {
231232 public function methodComment ($ reflect ) {
232233 $ name = $ reflect ->getDeclaringClass ()->name ;
233234 $ c = \xp::$ cn [$ name ] ?? strtr ($ name , '\\' , '. ' );
234- if ($ meta = \xp::$ meta [$ c ][1 ][$ reflect ->name ] ?? null ) {
235- return $ meta[ DETAIL_COMMENT ] ;
235+ if ($ meta = \xp::$ meta [$ c ][1 ][$ reflect ->name ][ DETAIL_COMMENT ] ?? null ) {
236+ return $ meta ;
236237 } else if (false === ($ c = $ reflect ->getDocComment ())) {
237238 return null ;
238239 } else {
@@ -295,7 +296,7 @@ public function virtualProperties($reflect) {
295296 if ($ meta = \xp::$ meta [\xp::$ cn [$ reflect ->name ] ?? strtr ($ reflect ->name , '\\' , '. ' )][0 ] ?? null ) {
296297 foreach ($ meta as $ name => $ property ) {
297298 if ($ arg = $ property [DETAIL_ARGUMENTS ] ?? null ) {
298- $ r [$ name ]= [$ arg [0 ], $ property [DETAIL_RETURNS ]];
299+ $ r [$ name ]= [$ arg [0 ], $ property [DETAIL_RETURNS ] ?? null ];
299300 }
300301 }
301302 continue ;
0 commit comments