File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,17 @@ public function initInterface(string $interface): void
72
72
}
73
73
$ requestClass = ReflectionUtil::getTypeCode ($ type , $ refClass ->getName ());
74
74
75
- $ docblock = $ this ->docBlockFactory ->create ($ method ->getDocComment ());
76
- // @phpstan-ignore-next-line
77
- $ responseClass = (string ) $ docblock ->getTagsByName ('return ' )[0 ]->getType ();
75
+ $ docComment = $ method ->getDocComment ();
76
+ if (false === $ docComment )
77
+ {
78
+ $ responseClass = '' ;
79
+ }
80
+ else
81
+ {
82
+ $ docblock = $ this ->docBlockFactory ->create ($ docComment );
83
+ // @phpstan-ignore-next-line
84
+ $ responseClass = (string ) $ docblock ->getTagsByName ('return ' )[0 ]->getType ();
85
+ }
78
86
79
87
$ data [$ method ->getName ()] = [
80
88
'request ' => $ requestClass ,
You can’t perform that action at this time.
0 commit comments