Merge pull request #11733 from Quix0r/fixes/returned-type-hint

Added returned type-int "int"
This commit is contained in:
Philipp 2022-07-13 21:14:28 +02:00 committed by GitHub
commit 59a1ba4fae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 28 additions and 28 deletions

View File

@ -82,7 +82,7 @@ HELP;
AddonCore::loadAddons(); AddonCore::loadAddons();
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -80,7 +80,7 @@ HELP;
$this->l10n = $l10n; $this->l10n = $l10n;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -110,7 +110,7 @@ HELP;
$this->dba = $dba; $this->dba = $dba;
} }
protected function doExecute() protected function doExecute(): int
{ {
// Initialise the app // Initialise the app
$this->out("Initializing setup..."); $this->out("Initializing setup...");

View File

@ -90,7 +90,7 @@ HELP;
$this->cache = $cache; $this->cache = $cache;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Executable: ' . $this->executable); $this->out('Executable: ' . $this->executable);

View File

@ -102,7 +102,7 @@ HELP;
$this->config = $config; $this->config = $config;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Executable: ' . $this->executable); $this->out('Executable: ' . $this->executable);

View File

@ -76,7 +76,7 @@ HELP;
$this->appMode = $appMode; $this->appMode = $appMode;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -45,7 +45,7 @@ HELP;
return $help; return $help;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -94,7 +94,7 @@ HELP;
$this->basePath = $basePath->getPath(); $this->basePath = $basePath->getPath();
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -71,7 +71,7 @@ HELP;
return $help; return $help;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -49,7 +49,7 @@ HELP;
return $help; return $help;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -85,7 +85,7 @@ HELP;
$this->l10n = $l10n; $this->l10n = $l10n;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -70,7 +70,7 @@ HELP;
$this->l10n = $l10n; $this->l10n = $l10n;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -75,7 +75,7 @@ HELP;
$this->dba =$dba; $this->dba =$dba;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -84,7 +84,7 @@ HELP;
$this->lock = $lock; $this->lock = $lock;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Executable: ' . $this->executable); $this->out('Executable: ' . $this->executable);

View File

@ -77,7 +77,7 @@ HELP;
$this->config = $config; $this->config = $config;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -67,7 +67,7 @@ HELP;
$this->l10n = $l10n; $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"); $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)) { while ($duplicate = $this->dba->fetch($duplicates)) {

View File

@ -85,7 +85,7 @@ HELP;
$this->config = $config; $this->config = $config;
} }
protected function doExecute() protected function doExecute(): int
{ {
if (!$this->config->get('system', 'avatar_cache')) { if (!$this->config->get('system', 'avatar_cache')) {
$this->err($this->l10n->t('The avatar cache needs to be enabled to use this command.')); $this->err($this->l10n->t('The avatar cache needs to be enabled to use this command.'));

View File

@ -63,7 +63,7 @@ HELP;
return $help; return $help;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -50,7 +50,7 @@ HELP;
return $help; return $help;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -69,7 +69,7 @@ HELP;
$this->l10n = $l10n; $this->l10n = $l10n;
} }
protected function doExecute() protected function doExecute(): int
{ {
$a = \Friendica\DI::app(); $a = \Friendica\DI::app();

View File

@ -76,7 +76,7 @@ HELP;
$this->dba = $dba; $this->dba = $dba;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Executable: ' . $this->executable); $this->out('Executable: ' . $this->executable);

View File

@ -74,7 +74,7 @@ HELP;
$this->config = $config; $this->config = $config;
} }
protected function doExecute() protected function doExecute(): int
{ {
if (count($this->args) == 0) { if (count($this->args) == 0) {
$this->out($this->getHelp()); $this->out($this->getHelp());

View File

@ -79,7 +79,7 @@ HELP;
$this->config = $config; $this->config = $config;
} }
protected function doExecute() protected function doExecute(): int
{ {
if (count($this->args) == 0) { if (count($this->args) == 0) {
$this->printBlockedServers($this->config); $this->printBlockedServers($this->config);

View File

@ -69,7 +69,7 @@ HELP;
return $help; return $help;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Executable: ' . $this->executable); $this->out('Executable: ' . $this->executable);

View File

@ -42,7 +42,7 @@ HELP;
return $help; return $help;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -60,7 +60,7 @@ HELP;
$this->config = $config; $this->config = $config;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -97,7 +97,7 @@ HELP;
$this->pConfig = $pConfig; $this->pConfig = $pConfig;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__); $this->out('Class: ' . __CLASS__);

View File

@ -121,7 +121,7 @@ HELP;
$this->dice = $dice; $this->dice = $dice;
} }
protected function doExecute() protected function doExecute(): int
{ {
if ($this->getOption('v')) { if ($this->getOption('v')) {
$this->out('Executable: ' . $this->executable); $this->out('Executable: ' . $this->executable);