File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,17 +51,19 @@ public function execute(): void
5151 $ reflectionClass = new \ReflectionClass ($ invokerClass );
5252 $ methodAccessor = $ reflectionClass ->getMethod ($ methodName );
5353
54- // parse PHPDoc
55- $ documentBlock = \phpDocumentor \Reflection \DocBlockFactory::createInstance ()
56- ->create ($ methodAccessor ->getDocComment ());
54+ if ($ document = $ methodAccessor ->getDocComment ()) {
55+ // parse PHPDoc
56+ $ documentBlock = \phpDocumentor \Reflection \DocBlockFactory::createInstance ()
57+ ->create ($ document );
5758
58- // Native annotation will dependency inject.
59- if (!empty ($ documentBlock ->getTagsByName ('native ' ))) {
60- array_unshift (
61- $ arguments ,
62- $ this ->getConstantPool (),
63- $ this ->javaClass
64- );
59+ // Native annotation will dependency inject.
60+ if (!empty ($ documentBlock ->getTagsByName ('native ' ))) {
61+ array_unshift (
62+ $ arguments ,
63+ $ this ->getConstantPool (),
64+ $ this ->javaClass
65+ );
66+ }
6567 }
6668
6769 $ result = $ methodAccessor ->invokeArgs (
You can’t perform that action at this time.
0 commit comments