]> git.mxchange.org Git - friendica.git/commitdiff
Use correct typing
authorPhilipp <admin@philipp.info>
Sun, 5 Jan 2025 21:59:01 +0000 (22:59 +0100)
committerPhilipp <admin@philipp.info>
Sun, 5 Jan 2025 22:13:46 +0000 (23:13 +0100)
src/Core/Console.php
src/Core/Container.php

index ad4c6fd8078359630e84dc7dde99b03471964df3..cf4ad5a0f415435c776cea3f9c7f3ee8639f6675 100644 (file)
@@ -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
index bccdf338581fe98b99ed09a0446209217251b15a..12a9b625a75265e71ee1cc9a85cb2e697ec6cbef 100644 (file)
@@ -37,7 +37,7 @@ class Container
         */
        public static function fromDice(Dice $container): self
        {
-               return new static($container);
+               return new self($container);
        }
 
        /**