diff --git a/composer/Plugin/Scaffold/ComposerScaffoldCommand.php b/composer/Plugin/Scaffold/ComposerScaffoldCommand.php index 6de8aa4bf8fc7743f43368ee28783835b5c75843..c1b34ca503b6459751c8b7e303073a3f9d4e8af5 100644 --- a/composer/Plugin/Scaffold/ComposerScaffoldCommand.php +++ b/composer/Plugin/Scaffold/ComposerScaffoldCommand.php @@ -47,7 +47,7 @@ protected function configure() { /** * {@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 a36366cc2eb99ecda37655479c2332a6a42d4699..c1b46728954618705802befa680e2404be831790 100644 --- a/core/lib/Drupal/Core/Command/DbDumpCommand.php +++ b/core/lib/Drupal/Core/Command/DbDumpCommand.php @@ -48,7 +48,7 @@ protected function configure() { /** * {@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 4765692168f3f66b05cfe1b8ea03369054e0bbcd..cf461df7346f2e1c91678c33ac6878dc8fba90f3 100644 --- a/core/lib/Drupal/Core/Command/DbImportCommand.php +++ b/core/lib/Drupal/Core/Command/DbImportCommand.php @@ -32,7 +32,7 @@ protected function configure() { /** * {@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 ac99bc6c3a4f61d3e125c5ecfbb82bb6b2277932..0dc481c63597f0a32a05ee75d3eb40282cee0a54 100644 --- a/core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php +++ b/core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php @@ -50,7 +50,7 @@ protected function configure() { /** * {@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 fbfebbf2d17eabf9caf121c40e3ba1119d3d36c3..9da8af0386d600476814c8d4a3660c9961c689eb 100644 --- a/core/lib/Drupal/Core/Command/GenerateTheme.php +++ b/core/lib/Drupal/Core/Command/GenerateTheme.php @@ -51,7 +51,7 @@ protected function configure() { /** * {@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 4b76025c11d1f7d3125b03bb67f845bed53d747b..2e73df37962dcb4321958c85d7e946d65b9870fb 100644 --- a/core/lib/Drupal/Core/Command/InstallCommand.php +++ b/core/lib/Drupal/Core/Command/InstallCommand.php @@ -60,7 +60,7 @@ protected function configure() { /** * {@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 690b20eb3b261bf869b6b5fbaac3ef1ce8dd3c00..572f6415c20f2f23a0204c43fdd7773b0bcc28c9 100644 --- a/core/lib/Drupal/Core/Command/QuickStartCommand.php +++ b/core/lib/Drupal/Core/Command/QuickStartCommand.php @@ -44,7 +44,7 @@ protected function configure() { /** * {@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 6c153241b2d9899dd5d0d64af1a71ab44d150464..09559db2aafa522f8fe6355ed199ff12152f6fed 100644 --- a/core/lib/Drupal/Core/Command/ServerCommand.php +++ b/core/lib/Drupal/Core/Command/ServerCommand.php @@ -58,7 +58,7 @@ protected function configure() { /** * {@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 cef2414ec00119d0f256476970ba0ea8ec23859c..5f29d4ed3f633e3b3f535ab7f9a080b0236fdcbb 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 @@ public function getDatabaseConnection(InputInterface $input) { /** * {@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 fb92ee8ec1be7788c603d3a388b0d8b0d4d6c0dd..e9d4349483a54380a1b3599f074aefd0310afc73 100644 --- a/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php +++ b/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php @@ -81,7 +81,7 @@ protected function configure() { /** * {@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 d0378779642a0863fe0559d3ba0383ba3a25396f..c88abb84ab18f2c6f51a2fc08bd1a2c802cce69c 100644 --- a/core/tests/Drupal/TestSite/Commands/TestSiteReleaseLocksCommand.php +++ b/core/tests/Drupal/TestSite/Commands/TestSiteReleaseLocksCommand.php @@ -29,7 +29,7 @@ protected function configure() { /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { TestDatabase::releaseAllTestLocks(); $output->writeln('<info>Successfully released all the test database locks</info>'); return 0; diff --git a/core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php b/core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php index 0eff01cedf1aced097ad69461d907ecbd0ec2b6e..a2b5f54e32034ddacf1e5b301cfab58055e3c34a 100644 --- a/core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php +++ b/core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php @@ -37,7 +37,7 @@ protected function configure() { /** * {@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 cb8c119d5af5226034ffb2275d734e210f41e993..6ea3395ea5380633ad28a5d5d20fcf915f91c41e 100644 --- a/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php +++ b/core/tests/Drupal/TestSite/Commands/TestSiteUserLoginCommand.php @@ -41,7 +41,7 @@ protected function configure() { * * @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);