From f1e93be6942d6caed04938b4bccb1a2bf5a531de Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 5 Jan 2025 22:59:01 +0100 Subject: [PATCH] Use correct typing --- src/Core/Console.php | 11 +++++------ src/Core/Container.php | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Core/Console.php b/src/Core/Console.php index ad4c6fd807..cf4ad5a0f4 100644 --- a/src/Core/Console.php +++ b/src/Core/Console.php @@ -7,7 +7,6 @@ namespace Friendica\Core; -use Dice\Dice; use Friendica; use Friendica\App; use Friendica\Core\Logger\Capability\LogChannel; @@ -19,12 +18,12 @@ class Console extends \Asika\SimpleConsole\Console { // Disables the default help handling protected $helpOptions = []; - protected $customHelpOptions = ['h', 'help', '?']; + protected array $customHelpOptions = ['h', 'help', '?']; /** - * @var Dice The DI library + * @var Container The Container */ - protected $container; + protected Container $container; protected function getHelp() { @@ -70,7 +69,7 @@ HELP; return $help; } - protected $subConsoles = [ + protected array $subConsoles = [ 'addon' => Friendica\Console\Addon::class, 'archivecontact' => Friendica\Console\ArchiveContact::class, 'autoinstall' => Friendica\Console\AutomaticInstallation::class, @@ -118,7 +117,7 @@ HELP; public static function create(Container $container, array $argv = null): Console { - return new static($container, $argv); + return new self($container, $argv); } protected function doExecute(): int diff --git a/src/Core/Container.php b/src/Core/Container.php index bccdf33858..12a9b625a7 100644 --- a/src/Core/Container.php +++ b/src/Core/Container.php @@ -37,7 +37,7 @@ class Container */ public static function fromDice(Dice $container): self { - return new static($container); + return new self($container); } /**