From e1baaf3fdb0e243dd9c55e01edb3c02679c3155e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Fri, 19 Aug 2022 15:19:14 +0200 Subject: [PATCH] [TASK] Add missing return type for command's execute method (#2082) Releases: main, 11.5 --- .../ApiOverview/CommandControllers/Index.rst | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Documentation/ApiOverview/CommandControllers/Index.rst b/Documentation/ApiOverview/CommandControllers/Index.rst index a98533300d..906cf437a7 100644 --- a/Documentation/ApiOverview/CommandControllers/Index.rst +++ b/Documentation/ApiOverview/CommandControllers/Index.rst @@ -192,22 +192,20 @@ This argument can be retrieved with :php:`$input->getArgument()`, the options wi // use Symfony\Component\Console\Input\InputInterface; // use Symfony\Component\Console\Output\OutputInterface; - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { - // ... + // ... - if ($input->getArgument('wizardName')) { - - // ... - - } - - if ($input->getOption('brute-force')) { - - // ... + if ($input->getArgument('wizardName')) { + // ... + } - } + if ($input->getOption('brute-force')) { + // ... + } + // ... + } .. _deactivating-the-command-in-scheduler: .. _schedulable: @@ -269,10 +267,11 @@ A backend user can be initialized with this call inside :php:`execute()` method: // use Symfony\Component\Console\Input\InputInterface; // use Symfony\Component\Console\Output\OutputInterface; - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { - // .. + // ... Bootstrap::initializeBackendAuthentication(); + // ... } This is necessary when using :ref:`DataHandler `