File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,10 +61,13 @@ public function execute(): void
6161 $ methodAccessor = $ reflectionClass ->getMethod ("{$ prefix }{$ methodName }" );
6262
6363 if ($ document = $ methodAccessor ->getDocComment ()) {
64- array_unshift (
65- $ arguments ,
66- ...$ this ->getNativeAnnotateInjections ($ document )
67- );
64+ $ prependInjections = $ this ->getNativeAnnotateInjections ($ document );
65+ if (!empty ($ prependInjections )) {
66+ array_unshift (
67+ $ arguments ,
68+ ...$ prependInjections
69+ );
70+ }
6871 }
6972
7073 $ return = forward_static_call_array (
Original file line number Diff line number Diff line change @@ -55,10 +55,13 @@ public function execute(): void
5555 $ methodAccessor = $ reflectionClass ->getMethod ($ methodName );
5656
5757 if ($ document = $ methodAccessor ->getDocComment ()) {
58- array_unshift (
59- $ arguments ,
60- ...$ this ->getNativeAnnotateInjections ($ document )
61- );
58+ $ prependInjections = $ this ->getNativeAnnotateInjections ($ document );
59+ if (!empty ($ prependInjections )) {
60+ array_unshift (
61+ $ arguments ,
62+ ...$ prependInjections
63+ );
64+ }
6265 }
6366
6467 $ result = call_user_func_array (
You can’t perform that action at this time.
0 commit comments