From 4cb5cadba86da3d168d8206103f763853c61e387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Wed, 13 Jul 2022 21:09:49 +0200 Subject: [PATCH] Added returned type-int "int" --- src/Console/Addon.php | 2 +- src/Console/ArchiveContact.php | 2 +- src/Console/AutomaticInstallation.php | 2 +- src/Console/Cache.php | 2 +- src/Console/Config.php | 2 +- src/Console/Contact.php | 2 +- src/Console/CreateDoxygen.php | 2 +- src/Console/DatabaseStructure.php | 2 +- src/Console/DocBloxErrorChecker.php | 2 +- src/Console/Extract.php | 2 +- src/Console/FixAPDeliveryWorkerTaskParameters.php | 2 +- src/Console/GlobalCommunityBlock.php | 2 +- src/Console/GlobalCommunitySilence.php | 2 +- src/Console/Lock.php | 2 +- src/Console/Maintenance.php | 2 +- src/Console/MergeContacts.php | 2 +- src/Console/MoveToAvatarCache.php | 2 +- src/Console/PhpToPo.php | 2 +- src/Console/PoToPhp.php | 2 +- src/Console/PostUpdate.php | 2 +- src/Console/Relay.php | 2 +- src/Console/Relocate.php | 2 +- src/Console/ServerBlock.php | 2 +- src/Console/Storage.php | 2 +- src/Console/Test.php | 2 +- src/Console/Typo.php | 2 +- src/Console/User.php | 2 +- src/Core/Console.php | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Console/Addon.php b/src/Console/Addon.php index 74b081810..13e1951f2 100644 --- a/src/Console/Addon.php +++ b/src/Console/Addon.php @@ -82,7 +82,7 @@ HELP; AddonCore::loadAddons(); } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/ArchiveContact.php b/src/Console/ArchiveContact.php index 4990d99e0..4bd832a61 100644 --- a/src/Console/ArchiveContact.php +++ b/src/Console/ArchiveContact.php @@ -80,7 +80,7 @@ HELP; $this->l10n = $l10n; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/AutomaticInstallation.php b/src/Console/AutomaticInstallation.php index ca25d71a6..1a6d10c24 100644 --- a/src/Console/AutomaticInstallation.php +++ b/src/Console/AutomaticInstallation.php @@ -110,7 +110,7 @@ HELP; $this->dba = $dba; } - protected function doExecute() + protected function doExecute(): int { // Initialise the app $this->out("Initializing setup..."); diff --git a/src/Console/Cache.php b/src/Console/Cache.php index e02d2225a..5062872e8 100644 --- a/src/Console/Cache.php +++ b/src/Console/Cache.php @@ -90,7 +90,7 @@ HELP; $this->cache = $cache; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Executable: ' . $this->executable); diff --git a/src/Console/Config.php b/src/Console/Config.php index e32983a68..760b1ca51 100644 --- a/src/Console/Config.php +++ b/src/Console/Config.php @@ -102,7 +102,7 @@ HELP; $this->config = $config; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Executable: ' . $this->executable); diff --git a/src/Console/Contact.php b/src/Console/Contact.php index f051d870a..37f3f056e 100644 --- a/src/Console/Contact.php +++ b/src/Console/Contact.php @@ -76,7 +76,7 @@ HELP; $this->appMode = $appMode; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/CreateDoxygen.php b/src/Console/CreateDoxygen.php index f7cdeaa3e..3d5ba865c 100644 --- a/src/Console/CreateDoxygen.php +++ b/src/Console/CreateDoxygen.php @@ -45,7 +45,7 @@ HELP; return $help; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/DatabaseStructure.php b/src/Console/DatabaseStructure.php index 7bb7120fa..88f12476f 100644 --- a/src/Console/DatabaseStructure.php +++ b/src/Console/DatabaseStructure.php @@ -94,7 +94,7 @@ HELP; $this->basePath = $basePath->getPath(); } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/DocBloxErrorChecker.php b/src/Console/DocBloxErrorChecker.php index 9e9eb1497..3d3a2b6d8 100644 --- a/src/Console/DocBloxErrorChecker.php +++ b/src/Console/DocBloxErrorChecker.php @@ -71,7 +71,7 @@ HELP; return $help; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/Extract.php b/src/Console/Extract.php index 1d651f641..06015f697 100644 --- a/src/Console/Extract.php +++ b/src/Console/Extract.php @@ -49,7 +49,7 @@ HELP; return $help; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/FixAPDeliveryWorkerTaskParameters.php b/src/Console/FixAPDeliveryWorkerTaskParameters.php index e4b895dea..eb285da8d 100644 --- a/src/Console/FixAPDeliveryWorkerTaskParameters.php +++ b/src/Console/FixAPDeliveryWorkerTaskParameters.php @@ -85,7 +85,7 @@ HELP; $this->l10n = $l10n; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/GlobalCommunityBlock.php b/src/Console/GlobalCommunityBlock.php index 39ce6d301..81099712e 100644 --- a/src/Console/GlobalCommunityBlock.php +++ b/src/Console/GlobalCommunityBlock.php @@ -70,7 +70,7 @@ HELP; $this->l10n = $l10n; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/GlobalCommunitySilence.php b/src/Console/GlobalCommunitySilence.php index a493bbcb8..89674efd3 100644 --- a/src/Console/GlobalCommunitySilence.php +++ b/src/Console/GlobalCommunitySilence.php @@ -75,7 +75,7 @@ HELP; $this->dba =$dba; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/Lock.php b/src/Console/Lock.php index eea5d51e1..a89f3d861 100644 --- a/src/Console/Lock.php +++ b/src/Console/Lock.php @@ -84,7 +84,7 @@ HELP; $this->lock = $lock; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Executable: ' . $this->executable); diff --git a/src/Console/Maintenance.php b/src/Console/Maintenance.php index 7e7318284..7744c9ee4 100644 --- a/src/Console/Maintenance.php +++ b/src/Console/Maintenance.php @@ -77,7 +77,7 @@ HELP; $this->config = $config; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/MergeContacts.php b/src/Console/MergeContacts.php index 543ad316e..0d05c579f 100644 --- a/src/Console/MergeContacts.php +++ b/src/Console/MergeContacts.php @@ -67,7 +67,7 @@ HELP; $this->l10n = $l10n; } - protected function doExecute() + protected function doExecute(): int { $duplicates = $this->dba->p("SELECT COUNT(*) AS `total`, `uri-id`, MAX(`url`) AS `url` FROM `contact` WHERE `uid` = 0 GROUP BY `uri-id` HAVING total > 1"); while ($duplicate = $this->dba->fetch($duplicates)) { diff --git a/src/Console/MoveToAvatarCache.php b/src/Console/MoveToAvatarCache.php index 441dff682..1f3147791 100644 --- a/src/Console/MoveToAvatarCache.php +++ b/src/Console/MoveToAvatarCache.php @@ -85,7 +85,7 @@ HELP; $this->config = $config; } - protected function doExecute() + protected function doExecute(): int { if (!$this->config->get('system', 'avatar_cache')) { $this->err($this->l10n->t('The avatar cache needs to be enabled to use this command.')); diff --git a/src/Console/PhpToPo.php b/src/Console/PhpToPo.php index a6667048f..4041c4069 100644 --- a/src/Console/PhpToPo.php +++ b/src/Console/PhpToPo.php @@ -63,7 +63,7 @@ HELP; return $help; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/PoToPhp.php b/src/Console/PoToPhp.php index b67327826..4f28db88b 100644 --- a/src/Console/PoToPhp.php +++ b/src/Console/PoToPhp.php @@ -50,7 +50,7 @@ HELP; return $help; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/PostUpdate.php b/src/Console/PostUpdate.php index 376d3abb4..8bec14e27 100644 --- a/src/Console/PostUpdate.php +++ b/src/Console/PostUpdate.php @@ -69,7 +69,7 @@ HELP; $this->l10n = $l10n; } - protected function doExecute() + protected function doExecute(): int { $a = \Friendica\DI::app(); diff --git a/src/Console/Relay.php b/src/Console/Relay.php index 4f6bbc6b6..56a3c3186 100644 --- a/src/Console/Relay.php +++ b/src/Console/Relay.php @@ -76,7 +76,7 @@ HELP; $this->dba = $dba; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Executable: ' . $this->executable); diff --git a/src/Console/Relocate.php b/src/Console/Relocate.php index c0054d396..c1db6ef53 100644 --- a/src/Console/Relocate.php +++ b/src/Console/Relocate.php @@ -74,7 +74,7 @@ HELP; $this->config = $config; } - protected function doExecute() + protected function doExecute(): int { if (count($this->args) == 0) { $this->out($this->getHelp()); diff --git a/src/Console/ServerBlock.php b/src/Console/ServerBlock.php index 9bf2c0ecc..38ae35d10 100644 --- a/src/Console/ServerBlock.php +++ b/src/Console/ServerBlock.php @@ -79,7 +79,7 @@ HELP; $this->config = $config; } - protected function doExecute() + protected function doExecute(): int { if (count($this->args) == 0) { $this->printBlockedServers($this->config); diff --git a/src/Console/Storage.php b/src/Console/Storage.php index d5af7c513..587601ba0 100644 --- a/src/Console/Storage.php +++ b/src/Console/Storage.php @@ -69,7 +69,7 @@ HELP; return $help; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Executable: ' . $this->executable); diff --git a/src/Console/Test.php b/src/Console/Test.php index 062e386f0..15c6bf60b 100644 --- a/src/Console/Test.php +++ b/src/Console/Test.php @@ -42,7 +42,7 @@ HELP; return $help; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/Typo.php b/src/Console/Typo.php index 1397f6092..4414662e7 100644 --- a/src/Console/Typo.php +++ b/src/Console/Typo.php @@ -60,7 +60,7 @@ HELP; $this->config = $config; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Console/User.php b/src/Console/User.php index 1c1d26b0a..586c300ea 100644 --- a/src/Console/User.php +++ b/src/Console/User.php @@ -97,7 +97,7 @@ HELP; $this->pConfig = $pConfig; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); diff --git a/src/Core/Console.php b/src/Core/Console.php index ebd4c51a9..2521e21be 100644 --- a/src/Core/Console.php +++ b/src/Core/Console.php @@ -121,7 +121,7 @@ HELP; $this->dice = $dice; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Executable: ' . $this->executable);