File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed
Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -174,24 +174,15 @@ public function getRunner(?object $application): RunnerInterface
174174
175175 protected function getArgument (\ReflectionParameter $ parameter , ?string $ type ): mixed
176176 {
177- switch ($ type ) {
178- case Request::class:
179- return Request::createFromGlobals ();
177+ return match ($ type ) {
178+ Request::class => Request::createFromGlobals (),
179+ InputInterface::class => $ this ->getInput (),
180+ OutputInterface::class => $ this ->output ??= new ConsoleOutput (),
181+ Application::class => $ this ->console ??= new Application (),
182+ Command::class => $ this ->command ??= new Command (),
183+ default => parent ::getArgument ($ parameter , $ type ),
184+ };
180185
181- case InputInterface::class:
182- return $ this ->getInput ();
183-
184- case OutputInterface::class:
185- return $ this ->output ??= new ConsoleOutput ();
186-
187- case Application::class:
188- return $ this ->console ??= new Application ();
189-
190- case Command::class:
191- return $ this ->command ??= new Command ();
192- }
193-
194- return parent ::getArgument ($ parameter , $ type );
195186 }
196187
197188 protected static function register (GenericRuntime $ runtime ): GenericRuntime
You can’t perform that action at this time.
0 commit comments