From: Roland Häder Date: Wed, 13 Jul 2022 19:09:49 +0000 (+0200) Subject: Added returned type-int "int" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4cb5cadba86da3d168d8206103f763853c61e387;p=friendica.git Added returned type-int "int" --- diff --git a/src/Console/Addon.php b/src/Console/Addon.php index 74b0818100..13e1951f2e 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 4990d99e0b..4bd832a616 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 ca25d71a6f..1a6d10c241 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 e02d2225a2..5062872e84 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 e32983a68a..760b1ca51b 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 f051d870a2..37f3f056e4 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 f7cdeaa3ef..3d5ba865c0 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 7bb7120fa7..88f12476f5 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 9e9eb14970..3d3a2b6d86 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 1d651f6413..06015f6970 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 e4b895dead..eb285da8d7 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 39ce6d3014..81099712ea 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 a493bbcb86..89674efd39 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 eea5d51e10..a89f3d861a 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 7e73182846..7744c9ee47 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 543ad316e7..0d05c579fa 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 441dff682d..1f3147791f 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 a6667048f4..4041c4069c 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 b67327826b..4f28db88b2 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 376d3abb4b..8bec14e276 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 4f6bbc6b6b..56a3c3186a 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 c0054d3963..c1db6ef534 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 9bf2c0ecca..38ae35d105 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 d5af7c5135..587601ba0c 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 062e386f05..15c6bf60b0 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 1397f6092f..4414662e7f 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 1c1d26b0a9..586c300eaf 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 ebd4c51a9d..2521e21bef 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);