mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
fix 14 PHPStan errors in console
This commit is contained in:
parent
2dfd7c83cf
commit
bb6a4a3acd
3 changed files with 19 additions and 16 deletions
|
@ -56,7 +56,7 @@ HELP;
|
|||
return $help;
|
||||
}
|
||||
|
||||
public function __construct(Mode $appMode, array $argv = null)
|
||||
public function __construct(Mode $appMode, ?array $argv = null)
|
||||
{
|
||||
parent::__construct($argv);
|
||||
|
||||
|
@ -84,13 +84,13 @@ HELP;
|
|||
|
||||
switch ($command) {
|
||||
case 'add':
|
||||
return $this->addContact();
|
||||
return ($this->addContact()) ? 0 : 1;
|
||||
case 'remove':
|
||||
return $this->removeContact();
|
||||
return ($this->removeContact()) ? 0 : 1;
|
||||
case 'search':
|
||||
return $this->searchContact();
|
||||
return ($this->searchContact()) ? 0 : 1;
|
||||
case 'terminate':
|
||||
return $this->terminateContact();
|
||||
return ($this->terminateContact()) ? 0 : 1;
|
||||
default:
|
||||
throw new \Asika\SimpleConsole\CommandArgsException('Wrong command.');
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ HELP;
|
|||
/**
|
||||
* Marks a contact for removal
|
||||
*/
|
||||
private function removeContact()
|
||||
private function removeContact(): bool
|
||||
{
|
||||
$cid = $this->getArgument(1);
|
||||
if (empty($cid)) {
|
||||
|
@ -218,6 +218,8 @@ HELP;
|
|||
}
|
||||
|
||||
ContactModel::remove($cid);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue