@@ -52,7 +52,7 @@ class Application extends AbstractApplication
5252 * @param Input|null $input
5353 * @param Output|null $output
5454 */
55- public function __construct (array $ config = [], Input $ input = null , Output $ output = null )
55+ public function __construct (array $ config = [], ? Input $ input = null , ? Output $ output = null )
5656 {
5757 Console::setApp ($ this );
5858
@@ -294,7 +294,7 @@ protected function createController(array $info): Controller
294294 *
295295 * @return $this
296296 */
297- public function controller (string $ name , ControllerInterface |string $ class = null , array $ config = []): static
297+ public function controller (string $ name , ControllerInterface |string | null $ class = null , array $ config = []): static
298298 {
299299 $ this ->logf (Console::VERB_CRAZY , 'register group controller: %s ' , $ name );
300300 $ this ->router ->addGroup ($ name , $ class , $ config );
@@ -312,7 +312,7 @@ public function controller(string $name, ControllerInterface|string $class = nul
312312 * @return static
313313 * @see controller()
314314 */
315- public function addGroup (string $ name , ControllerInterface |string $ class = null , array $ config = []): static
315+ public function addGroup (string $ name , ControllerInterface |string | null $ class = null , array $ config = []): static
316316 {
317317 return $ this ->controller ($ name , $ class , $ config );
318318 }
@@ -325,7 +325,7 @@ public function addGroup(string $name, ControllerInterface|string $class = null,
325325 * @return $this
326326 * @see controller()
327327 */
328- public function addController (string $ name , ControllerInterface |string $ class = null , array $ config = []): static
328+ public function addController (string $ name , ControllerInterface |string | null $ class = null , array $ config = []): static
329329 {
330330 return $ this ->controller ($ name , $ class , $ config );
331331 }
@@ -353,7 +353,7 @@ public function addControllers(array $controllers): void
353353 *
354354 * @return Application
355355 */
356- public function command (string $ name , string |Closure |CommandInterface $ handler = null , array $ config = []): static
356+ public function command (string $ name , string |Closure |CommandInterface | null $ handler = null , array $ config = []): static
357357 {
358358 $ this ->logf (Console::VERB_CRAZY , 'register alone command: %s ' , $ name );
359359 $ this ->router ->addCommand ($ name , $ handler , $ config );
@@ -371,7 +371,7 @@ public function command(string $name, string|Closure|CommandInterface $handler =
371371 * @return Application
372372 * @see command()
373373 */
374- public function addCommand (string $ name , string |Closure |CommandInterface $ handler = null , array $ config = []): static
374+ public function addCommand (string $ name , string |Closure |CommandInterface | null $ handler = null , array $ config = []): static
375375 {
376376 return $ this ->command ($ name , $ handler , $ config );
377377 }
0 commit comments