diff --git a/composer/Plugin/Scaffold/ComposerScaffoldCommand.php b/composer/Plugin/Scaffold/ComposerScaffoldCommand.php index 6de8aa4bf8f..c1b34ca503b 100644 --- a/composer/Plugin/Scaffold/ComposerScaffoldCommand.php +++ b/composer/Plugin/Scaffold/ComposerScaffoldCommand.php @@ -47,7 +47,7 @@ EOT /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $handler = new Handler($this->getComposer(), $this->getIO()); $handler->scaffold(); return 0; diff --git a/core/lib/Drupal/Core/Command/DbDumpCommand.php b/core/lib/Drupal/Core/Command/DbDumpCommand.php index a36366cc2eb..c1b46728954 100644 --- a/core/lib/Drupal/Core/Command/DbDumpCommand.php +++ b/core/lib/Drupal/Core/Command/DbDumpCommand.php @@ -48,7 +48,7 @@ class DbDumpCommand extends DbCommandBase { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $connection = $this->getDatabaseConnection($input); // If not explicitly set, disable ANSI which will break generated php. diff --git a/core/lib/Drupal/Core/Command/DbImportCommand.php b/core/lib/Drupal/Core/Command/DbImportCommand.php index 4765692168f..cf461df7346 100644 --- a/core/lib/Drupal/Core/Command/DbImportCommand.php +++ b/core/lib/Drupal/Core/Command/DbImportCommand.php @@ -32,7 +32,7 @@ class DbImportCommand extends DbCommandBase { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $script = $input->getArgument('script'); if (!is_file($script)) { $output->writeln('File must exist.'); diff --git a/core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php b/core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php index ac99bc6c3a4..0dc481c6359 100644 --- a/core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php +++ b/core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php @@ -50,7 +50,7 @@ class GenerateProxyClassCommand extends Command { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $class_name = ltrim($input->getArgument('class_name'), '\\'); $namespace_root = $input->getArgument('namespace_root_path'); diff --git a/core/lib/Drupal/Core/Command/GenerateTheme.php b/core/lib/Drupal/Core/Command/GenerateTheme.php index fbfebbf2d17..9da8af0386d 100644 --- a/core/lib/Drupal/Core/Command/GenerateTheme.php +++ b/core/lib/Drupal/Core/Command/GenerateTheme.php @@ -51,7 +51,7 @@ class GenerateTheme extends Command { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); // Change the directory to the Drupal root. diff --git a/core/lib/Drupal/Core/Command/InstallCommand.php b/core/lib/Drupal/Core/Command/InstallCommand.php index 4b76025c11d..2e73df37962 100644 --- a/core/lib/Drupal/Core/Command/InstallCommand.php +++ b/core/lib/Drupal/Core/Command/InstallCommand.php @@ -60,7 +60,7 @@ class InstallCommand extends Command { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); if (!extension_loaded('pdo_sqlite')) { $io->getErrorStyle()->error('You must have the pdo_sqlite PHP extension installed. See core/INSTALL.sqlite.txt for instructions.'); diff --git a/core/lib/Drupal/Core/Command/QuickStartCommand.php b/core/lib/Drupal/Core/Command/QuickStartCommand.php index 690b20eb3b2..572f6415c20 100644 --- a/core/lib/Drupal/Core/Command/QuickStartCommand.php +++ b/core/lib/Drupal/Core/Command/QuickStartCommand.php @@ -44,7 +44,7 @@ class QuickStartCommand extends Command { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $command = $this->getApplication()->find('install'); $arguments = [ diff --git a/core/lib/Drupal/Core/Command/ServerCommand.php b/core/lib/Drupal/Core/Command/ServerCommand.php index 6c153241b2d..09559db2aaf 100644 --- a/core/lib/Drupal/Core/Command/ServerCommand.php +++ b/core/lib/Drupal/Core/Command/ServerCommand.php @@ -58,7 +58,7 @@ class ServerCommand extends Command { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); $host = $input->getOption('host'); diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php index cef2414ec00..5f29d4ed3f6 100644 --- a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php +++ b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php @@ -129,7 +129,7 @@ class DbCommandBaseTester extends DbCommandBase { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { // Empty implementation for testing. return 0; } diff --git a/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php b/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php index fb92ee8ec1b..e9d4349483a 100644 --- a/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php +++ b/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php @@ -81,7 +81,7 @@ class TestSiteInstallCommand extends Command { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { // Determines and validates the setup class prior to installing a database // to avoid creating unnecessary sites. $root = dirname(__DIR__, 5); diff --git a/core/tests/Drupal/TestSite/Commands/TestSiteReleaseLocksCommand.php b/core/tests/Drupal/TestSite/Commands/TestSiteReleaseLocksCommand.php index d0378779642..c88abb84ab1 100644 --- a/core/tests/Drupal/TestSite/Commands/TestSiteReleaseLocksCommand.php +++ b/core/tests/Drupal/TestSite/Commands/TestSiteReleaseLocksCommand.php @@ -29,7 +29,7 @@ class TestSiteReleaseLocksCommand extends Command { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { TestDatabase::releaseAllTestLocks(); $output->writeln('Successfully released all the test database locks'); return 0; diff --git a/core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php b/core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php index 0eff01cedf1..a2b5f54e320 100644 --- a/core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php +++ b/core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php @@ -37,7 +37,7 @@ class TestSiteTearDownCommand extends Command { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $db_prefix = $input->getArgument('db-prefix'); // Validate the db_prefix argument. try { diff --git a/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php b/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php index cb8c119d5af..6ea3395ea53 100644 --- a/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php +++ b/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php @@ -41,7 +41,7 @@ class TestSiteUserLoginCommand extends Command { * * @throws \Symfony\Component\Console\Exception\InvalidArgumentException */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $root = dirname(__DIR__, 5); chdir($root);