From a85176a1b1cda2cc5761e7616ac228d31d4ddd9a Mon Sep 17 00:00:00 2001 From: 10966 Date: Thu, 29 Feb 2024 12:02:48 +0000 Subject: [PATCH 1/7] =?UTF-8?q?=E6=96=B9=E6=B3=95=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Command/FlushFailedMessageCommand.php | 4 ++-- src/async-queue/src/Command/InfoCommand.php | 4 ++-- .../src/Command/ReloadFailedMessageCommand.php | 4 ++-- src/command/src/Command.php | 4 ++-- src/command/src/Concerns/DisableEventDispatcher.php | 2 +- src/command/src/Concerns/HasParameters.php | 6 +++--- src/command/src/Console.php | 2 +- src/database/src/Commands/ModelCommand.php | 10 +++++----- src/devtool/src/Describe/AspectsCommand.php | 4 ++-- src/devtool/src/Describe/ListenersCommand.php | 8 ++++---- src/devtool/src/Describe/RoutesCommand.php | 10 +++++----- .../src/Command/GenerateMigrationCommand.php | 4 ++-- src/phar/src/BuildCommand.php | 6 +++--- src/swagger/src/Command/GenCommand.php | 4 ++-- src/swagger/src/Command/GenSchemaCommand.php | 4 ++-- .../src/Command/GenerateViewCacheCommand.php | 4 ++-- 16 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/async-queue/src/Command/FlushFailedMessageCommand.php b/src/async-queue/src/Command/FlushFailedMessageCommand.php index 7c63695f3e..43d9e0928e 100644 --- a/src/async-queue/src/Command/FlushFailedMessageCommand.php +++ b/src/async-queue/src/Command/FlushFailedMessageCommand.php @@ -27,7 +27,7 @@ public function __construct(ContainerInterface $container) parent::__construct('queue:flush'); } - public function handle() + public function handle(): void { $name = $this->input->getArgument('name'); $queue = $this->input->getOption('queue'); @@ -40,7 +40,7 @@ public function handle() $this->output->writeln('Flush all message from failed queue.'); } - protected function configure() + protected function configure(): void { $this->setDescription('Delete all message from failed queue.'); $this->addArgument('name', InputArgument::OPTIONAL, 'The name of queue.', 'default'); diff --git a/src/async-queue/src/Command/InfoCommand.php b/src/async-queue/src/Command/InfoCommand.php index e78bf41f63..b6bd144a9e 100644 --- a/src/async-queue/src/Command/InfoCommand.php +++ b/src/async-queue/src/Command/InfoCommand.php @@ -26,7 +26,7 @@ public function __construct(ContainerInterface $container) parent::__construct('queue:info'); } - public function handle() + public function handle(): void { $name = $this->input->getArgument('name'); $factory = $this->container->get(DriverFactory::class); @@ -38,7 +38,7 @@ public function handle() } } - protected function configure() + protected function configure(): void { $this->setDescription('Get all messages from the queue.'); $this->addArgument('name', InputArgument::OPTIONAL, 'The name of queue.', 'default'); diff --git a/src/async-queue/src/Command/ReloadFailedMessageCommand.php b/src/async-queue/src/Command/ReloadFailedMessageCommand.php index b60b055659..5b263c153b 100644 --- a/src/async-queue/src/Command/ReloadFailedMessageCommand.php +++ b/src/async-queue/src/Command/ReloadFailedMessageCommand.php @@ -27,7 +27,7 @@ public function __construct(ContainerInterface $container) parent::__construct('queue:reload'); } - public function handle() + public function handle(): void { $name = $this->input->getArgument('name'); $queue = $this->input->getOption('queue'); @@ -40,7 +40,7 @@ public function handle() $this->output->writeln(sprintf('Reload %d failed message into waiting queue.', $num)); } - protected function configure() + protected function configure(): void { $this->setDescription('Reload all failed message into waiting queue.'); $this->addArgument('name', InputArgument::OPTIONAL, 'The name of queue.', 'default'); diff --git a/src/command/src/Command.php b/src/command/src/Command.php index b5d2a8a677..8e2eb21d59 100644 --- a/src/command/src/Command.php +++ b/src/command/src/Command.php @@ -143,7 +143,7 @@ protected function context(): array /** * Configure the console command using a fluent definition. */ - protected function configureUsingFluentDefinition() + protected function configureUsingFluentDefinition(): void { [$name, $arguments, $options] = Parser::parse($this->signature); @@ -156,7 +156,7 @@ protected function configureUsingFluentDefinition() $this->getDefinition()->addOptions($options); } - protected function configure() + protected function configure(): void { parent::configure(); } diff --git a/src/command/src/Concerns/DisableEventDispatcher.php b/src/command/src/Concerns/DisableEventDispatcher.php index 88b3c286d6..7774a38520 100644 --- a/src/command/src/Concerns/DisableEventDispatcher.php +++ b/src/command/src/Concerns/DisableEventDispatcher.php @@ -23,7 +23,7 @@ public function addDisableDispatcherOption(): void $this->addOption('disable-event-dispatcher', null, InputOption::VALUE_NONE, 'Whether disable event dispatcher.'); } - public function disableDispatcher(InputInterface $input) + public function disableDispatcher(InputInterface $input): void { if (! $input->getOption('disable-event-dispatcher')) { if (! ApplicationContext::hasContainer()) { diff --git a/src/command/src/Concerns/HasParameters.php b/src/command/src/Concerns/HasParameters.php index bba0f92589..9b86390c8b 100644 --- a/src/command/src/Concerns/HasParameters.php +++ b/src/command/src/Concerns/HasParameters.php @@ -19,7 +19,7 @@ trait HasParameters /** * Specify the arguments and options on the command. */ - protected function specifyParameters() + protected function specifyParameters(): void { // We will loop through all of the arguments and options for the command and // set them all on the base command instance. This specifies what can get @@ -46,7 +46,7 @@ protected function specifyParameters() * * @return array */ - protected function getArguments() + protected function getArguments(): array { return []; } @@ -56,7 +56,7 @@ protected function getArguments() * * @return array */ - protected function getOptions() + protected function getOptions(): array { return []; } diff --git a/src/command/src/Console.php b/src/command/src/Console.php index 5f2d7f6a6f..0d5cb0d24a 100644 --- a/src/command/src/Console.php +++ b/src/command/src/Console.php @@ -23,7 +23,7 @@ class Console /** * @var ClosureCommand[] */ - protected static $commands = []; + protected static array $commands = []; public static function command(string $signature, Closure $command): ClosureCommand { diff --git a/src/database/src/Commands/ModelCommand.php b/src/database/src/Commands/ModelCommand.php index 1a0c01b13f..566cc07221 100644 --- a/src/database/src/Commands/ModelCommand.php +++ b/src/database/src/Commands/ModelCommand.php @@ -72,7 +72,7 @@ public function run(InputInterface $input, OutputInterface $output): int return parent::run($input, $output); } - public function handle() + public function handle(): void { $table = $this->input->getArgument('table'); $pool = $this->input->getOption('pool'); @@ -99,7 +99,7 @@ public function handle() } } - protected function configure() + protected function configure(): void { $this->addArgument('table', InputArgument::OPTIONAL, 'Which table you want to associated with the Model.'); @@ -124,7 +124,7 @@ protected function getSchemaBuilder(string $poolName): Builder return $connection->getSchemaBuilder(); } - protected function createModels(ModelOption $option) + protected function createModels(ModelOption $option): void { $builder = $this->getSchemaBuilder($option->getPool()); $tables = []; @@ -151,7 +151,7 @@ protected function isIgnoreTable(string $table, ModelOption $option): bool return $table === $this->config->get('databases.migrations', 'migrations'); } - protected function createModel(string $table, ModelOption $option) + protected function createModel(string $table, ModelOption $option): void { $builder = $this->getSchemaBuilder($option->getPool()); $table = Str::replaceFirst($option->getPrefix(), '', $table); @@ -196,7 +196,7 @@ protected function createModel(string $table, ModelOption $option) } } - protected function generateIDE(string $code, ModelOption $option, ModelData $data) + protected function generateIDE(string $code, ModelOption $option, ModelData $data): void { $stmts = $this->astParser->parse($code); $traverser = new NodeTraverser(); diff --git a/src/devtool/src/Describe/AspectsCommand.php b/src/devtool/src/Describe/AspectsCommand.php index 75241c8a0c..1f1476c75e 100644 --- a/src/devtool/src/Describe/AspectsCommand.php +++ b/src/devtool/src/Describe/AspectsCommand.php @@ -27,7 +27,7 @@ public function __construct() parent::__construct('describe:aspects'); } - public function handle() + public function handle(): void { $classes = $this->input->getOption('classes'); $classes = $classes ? explode(',', $classes) : null; @@ -39,7 +39,7 @@ public function handle() $this->show('Annotations', $this->handleData($collector['annotations'], $classes, $aspects), $this->output); } - protected function configure() + protected function configure(): void { $this->setDescription('Describe the aspects.') ->addOption('classes', 'e', InputOption::VALUE_OPTIONAL, 'Get the detail of the specified information by classes.') diff --git a/src/devtool/src/Describe/ListenersCommand.php b/src/devtool/src/Describe/ListenersCommand.php index 2bda523715..22a3662fd9 100644 --- a/src/devtool/src/Describe/ListenersCommand.php +++ b/src/devtool/src/Describe/ListenersCommand.php @@ -30,7 +30,7 @@ public function __construct(private ContainerInterface $container) parent::__construct('describe:listeners'); } - public function handle() + public function handle(): void { $events = $this->input->getOption('events'); $events = $events ? explode(',', $events) : null; @@ -41,7 +41,7 @@ public function handle() $this->show($this->handleData($provider, $events, $listeners), $this->output); } - protected function configure() + protected function configure(): void { $this->setDescription('Describe the events and listeners.') ->addOption('events', 'e', InputOption::VALUE_OPTIONAL, 'Get the detail of the specified information by events.') @@ -80,7 +80,7 @@ protected function handleData(ListenerProviderInterface $provider, ?array $event return $data; } - protected function isMatch(string $target, array $keywords = []) + protected function isMatch(string $target, array $keywords = []): bool { foreach ($keywords as $keyword) { if (str_contains($target, $keyword)) { @@ -90,7 +90,7 @@ protected function isMatch(string $target, array $keywords = []) return false; } - protected function show(array $data, OutputInterface $output) + protected function show(array $data, OutputInterface $output): void { $rows = []; foreach ($data as $route) { diff --git a/src/devtool/src/Describe/RoutesCommand.php b/src/devtool/src/Describe/RoutesCommand.php index 756cb5e20b..ed150a735d 100644 --- a/src/devtool/src/Describe/RoutesCommand.php +++ b/src/devtool/src/Describe/RoutesCommand.php @@ -33,7 +33,7 @@ public function __construct(private ContainerInterface $container, private Confi parent::__construct('describe:routes'); } - public function handle() + public function handle(): void { $path = $this->input->getOption('path'); $server = $this->input->getOption('server'); @@ -46,14 +46,14 @@ public function handle() ); } - protected function configure() + protected function configure(): void { $this->setDescription('Describe the routes information.') ->addOption('path', 'p', InputOption::VALUE_OPTIONAL, 'Get the detail of the specified route information by path') ->addOption('server', 'S', InputOption::VALUE_OPTIONAL, 'Which server you want to describe routes.', 'http'); } - protected function analyzeRouter(string $server, RouteCollector $router, ?string $path) + protected function analyzeRouter(string $server, RouteCollector $router, ?string $path): array { $data = []; [$staticRouters, $variableRouters] = $router->getData(); @@ -74,7 +74,7 @@ protected function analyzeRouter(string $server, RouteCollector $router, ?string return $data; } - protected function analyzeHandler(array &$data, string $serverName, string $method, ?string $path, Handler $handler) + protected function analyzeHandler(array &$data, string $serverName, string $method, ?string $path, Handler $handler): void { $uri = $handler->route; if (! is_null($path) && ! Str::contains($uri, $path)) { @@ -108,7 +108,7 @@ protected function analyzeHandler(array &$data, string $serverName, string $meth } } - private function show(array $data, OutputInterface $output) + private function show(array $data, OutputInterface $output): void { $rows = []; foreach ($data as $route) { diff --git a/src/migration-generator/src/Command/GenerateMigrationCommand.php b/src/migration-generator/src/Command/GenerateMigrationCommand.php index d4a45e1b2b..a535763de9 100644 --- a/src/migration-generator/src/Command/GenerateMigrationCommand.php +++ b/src/migration-generator/src/Command/GenerateMigrationCommand.php @@ -37,7 +37,7 @@ public function __construct(protected ContainerInterface $container) parent::__construct('gen:migration-from-database'); } - public function configure() + public function configure(): void { parent::configure(); $this->setDescription('Generate migrations from an existing table structure'); @@ -46,7 +46,7 @@ public function configure() $this->addOption('path', null, InputOption::VALUE_OPTIONAL, 'The path that you want the migration to be generated.', 'migrations'); } - public function handle() + public function handle(): void { $table = $this->input->getArgument('table'); $pool = $this->input->getOption('pool'); diff --git a/src/phar/src/BuildCommand.php b/src/phar/src/BuildCommand.php index bf80098190..ee90805551 100644 --- a/src/phar/src/BuildCommand.php +++ b/src/phar/src/BuildCommand.php @@ -25,7 +25,7 @@ public function __construct(protected ContainerInterface $container) parent::__construct('phar:build'); } - public function configure() + public function configure(): void { $this->setDescription('Pack your project into a Phar package.') ->addOption('name', '', InputOption::VALUE_OPTIONAL, 'This is the name of the Phar package, and if it is not passed in, the project name is used by default') @@ -35,7 +35,7 @@ public function configure() ->addOption('mount', 'M', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The mount path or dir.'); } - public function handle() + public function handle(): void { $this->assertWritable(); $name = $this->input->getOption('name'); @@ -67,7 +67,7 @@ public function handle() /** * check readonly. */ - public function assertWritable() + public function assertWritable(): void { if (ini_get('phar.readonly') === '1') { throw new UnexpectedValueException('Your configuration disabled writing phar files (phar.readonly = On), please update your configuration'); diff --git a/src/swagger/src/Command/GenCommand.php b/src/swagger/src/Command/GenCommand.php index 5b39b9664a..d038412c91 100644 --- a/src/swagger/src/Command/GenCommand.php +++ b/src/swagger/src/Command/GenCommand.php @@ -23,13 +23,13 @@ public function __construct(protected ContainerInterface $container) parent::__construct('gen:swagger'); } - public function configure() + public function configure(): void { parent::configure(); $this->setDescription('Generate swagger json file.'); } - public function handle() + public function handle(): void { $config = $this->container->get(ConfigInterface::class); diff --git a/src/swagger/src/Command/GenSchemaCommand.php b/src/swagger/src/Command/GenSchemaCommand.php index ebb80d1f38..6bfe45c487 100644 --- a/src/swagger/src/Command/GenSchemaCommand.php +++ b/src/swagger/src/Command/GenSchemaCommand.php @@ -29,7 +29,7 @@ public function __construct(protected ContainerInterface $container) parent::__construct('gen:swagger-schema'); } - public function configure() + public function configure(): void { parent::configure(); $this->setDescription('Generate swagger schemas.'); @@ -38,7 +38,7 @@ public function configure() $this->addOption('model', 'M', InputOption::VALUE_OPTIONAL, 'The model which used to generate schemas.'); } - public function handle() + public function handle(): void { $name = $this->input->getOption('name'); $force = $this->input->getOption('force'); diff --git a/src/view-engine/src/Command/GenerateViewCacheCommand.php b/src/view-engine/src/Command/GenerateViewCacheCommand.php index 02cf5d026b..9e60091ac7 100644 --- a/src/view-engine/src/Command/GenerateViewCacheCommand.php +++ b/src/view-engine/src/Command/GenerateViewCacheCommand.php @@ -24,13 +24,13 @@ public function __construct(protected ContainerInterface $container) parent::__construct('gen:view-engine-cache'); } - public function configure() + public function configure(): void { parent::configure(); $this->setDescription('Generate View Engine Cache'); } - public function handle() + public function handle(): void { $dir = $this->container->get(ConfigInterface::class)->get('view.config.view_path'); if (empty($dir)) { From 70c68c858ce7d88f3921501503db4f5c861ffee2 Mon Sep 17 00:00:00 2001 From: 10966 Date: Fri, 1 Mar 2024 09:37:35 +0000 Subject: [PATCH 2/7] =?UTF-8?q?=E6=96=B9=E6=B3=95=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/command/src/Concerns/HasParameters.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/command/src/Concerns/HasParameters.php b/src/command/src/Concerns/HasParameters.php index 9b86390c8b..289b938c7f 100644 --- a/src/command/src/Concerns/HasParameters.php +++ b/src/command/src/Concerns/HasParameters.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Command\Concerns; use Symfony\Component\Console\Input\InputArgument; @@ -43,8 +44,6 @@ protected function specifyParameters(): void /** * Get the console command arguments. - * - * @return array */ protected function getArguments(): array { @@ -53,8 +52,6 @@ protected function getArguments(): array /** * Get the console command options. - * - * @return array */ protected function getOptions(): array { From bbd6b87c8c21007c632ac2b586a8b2c1c2696704 Mon Sep 17 00:00:00 2001 From: 10966 Date: Tue, 5 Mar 2024 02:57:58 +0000 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=B2=E7=9F=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/database/src/Commands/Migrations/InstallCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database/src/Commands/Migrations/InstallCommand.php b/src/database/src/Commands/Migrations/InstallCommand.php index d354b443f9..b80be87e6b 100755 --- a/src/database/src/Commands/Migrations/InstallCommand.php +++ b/src/database/src/Commands/Migrations/InstallCommand.php @@ -28,7 +28,7 @@ public function __construct(protected MigrationRepositoryInterface $repository) /** * Handle the current command. */ - public function handle() + public function handle(): void { $this->repository->setSource($this->input->getOption('database')); @@ -42,7 +42,7 @@ public function handle() * * @return array */ - protected function getOptions() + protected function getOptions(): array { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], From 076f3023fc67071c6e6a47c23eecf812b1959b74 Mon Sep 17 00:00:00 2001 From: 10966 Date: Tue, 5 Mar 2024 03:04:32 +0000 Subject: [PATCH 4/7] =?UTF-8?q?=E8=A1=A5=E5=85=85=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/database/src/Commands/Migrations/ResetCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/src/Commands/Migrations/ResetCommand.php b/src/database/src/Commands/Migrations/ResetCommand.php index ddb173e687..6c81eea700 100755 --- a/src/database/src/Commands/Migrations/ResetCommand.php +++ b/src/database/src/Commands/Migrations/ResetCommand.php @@ -57,7 +57,7 @@ public function handle() * * @return array */ - protected function getOptions() + protected function getOptions(): array { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], From 02e7032b5d985efc02e155d2a33fb357227ae734 Mon Sep 17 00:00:00 2001 From: 10966 Date: Tue, 5 Mar 2024 03:15:14 +0000 Subject: [PATCH 5/7] =?UTF-8?q?=E8=A1=A5=E5=85=85=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/database/src/Commands/Migrations/RefreshCommand.php | 2 +- src/database/src/Commands/Migrations/RollbackCommand.php | 2 +- src/database/src/Commands/Migrations/StatusCommand.php | 2 +- src/database/src/Commands/Seeders/SeedCommand.php | 2 +- src/scout/src/Console/FlushCommand.php | 2 +- src/scout/src/Console/ImportCommand.php | 4 ++-- src/socketio-server/src/Command/RemoveRedisGarbage.php | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/database/src/Commands/Migrations/RefreshCommand.php b/src/database/src/Commands/Migrations/RefreshCommand.php index 14bd5e95b6..c71cbebcb4 100755 --- a/src/database/src/Commands/Migrations/RefreshCommand.php +++ b/src/database/src/Commands/Migrations/RefreshCommand.php @@ -118,7 +118,7 @@ protected function runSeeder(string $database): void * * @return array */ - protected function getOptions() + protected function getOptions(): array { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], diff --git a/src/database/src/Commands/Migrations/RollbackCommand.php b/src/database/src/Commands/Migrations/RollbackCommand.php index 1e88d8d7f3..1201fc93e5 100755 --- a/src/database/src/Commands/Migrations/RollbackCommand.php +++ b/src/database/src/Commands/Migrations/RollbackCommand.php @@ -53,7 +53,7 @@ public function handle() * * @return array */ - protected function getOptions() + protected function getOptions(): array { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], diff --git a/src/database/src/Commands/Migrations/StatusCommand.php b/src/database/src/Commands/Migrations/StatusCommand.php index 4b9e034953..5fa1cd3313 100644 --- a/src/database/src/Commands/Migrations/StatusCommand.php +++ b/src/database/src/Commands/Migrations/StatusCommand.php @@ -80,7 +80,7 @@ protected function getAllMigrationFiles() * * @return array */ - protected function getOptions() + protected function getOptions(): array { return [ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'], diff --git a/src/database/src/Commands/Seeders/SeedCommand.php b/src/database/src/Commands/Seeders/SeedCommand.php index 77570d4224..ba2c9d7499 100644 --- a/src/database/src/Commands/Seeders/SeedCommand.php +++ b/src/database/src/Commands/Seeders/SeedCommand.php @@ -51,7 +51,7 @@ public function handle() * * @return array */ - protected function getOptions() + protected function getOptions(): array { return [ ['path', null, InputOption::VALUE_OPTIONAL, 'The location where the seeders file stored'], diff --git a/src/scout/src/Console/FlushCommand.php b/src/scout/src/Console/FlushCommand.php index 26dd3e5bd2..061ae23d7f 100644 --- a/src/scout/src/Console/FlushCommand.php +++ b/src/scout/src/Console/FlushCommand.php @@ -38,7 +38,7 @@ public function handle() $this->info('All [' . $class . '] records have been flushed.'); } - protected function getArguments() + protected function getArguments(): array { return [ ['model', InputArgument::REQUIRED, 'fully qualified class name of the model'], diff --git a/src/scout/src/Console/ImportCommand.php b/src/scout/src/Console/ImportCommand.php index c25922d1fe..5fa569babc 100644 --- a/src/scout/src/Console/ImportCommand.php +++ b/src/scout/src/Console/ImportCommand.php @@ -50,7 +50,7 @@ public function handle() $this->info('All [' . $class . '] records have been imported.'); } - protected function getOptions() + protected function getOptions(): array { return [ ['column', 'c', InputOption::VALUE_OPTIONAL, 'Column used in chunking. (Default use primary key)'], @@ -58,7 +58,7 @@ protected function getOptions() ]; } - protected function getArguments() + protected function getArguments(): array { return [ ['model', InputArgument::REQUIRED, 'fully qualified class name of the model'], diff --git a/src/socketio-server/src/Command/RemoveRedisGarbage.php b/src/socketio-server/src/Command/RemoveRedisGarbage.php index c3c3351ca7..472e7c121e 100644 --- a/src/socketio-server/src/Command/RemoveRedisGarbage.php +++ b/src/socketio-server/src/Command/RemoveRedisGarbage.php @@ -26,7 +26,7 @@ public function __construct(private RedisFactory $factory) parent::__construct('socketio:clear'); } - public function handle() + public function handle(): void { $redis = $this->factory->get($this->connection); $nsp = $this->input->getArgument('namespace'); @@ -46,7 +46,7 @@ public function handle() } } - protected function getArguments() + protected function getArguments(): array { return [ ['namespace', InputArgument::OPTIONAL, 'The namespace to be cleaned up.'], From 0e0ff6e05dfeee7de6ba91a41fec5c7223b5f03f Mon Sep 17 00:00:00 2001 From: 10966 Date: Tue, 5 Mar 2024 03:28:47 +0000 Subject: [PATCH 6/7] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/command/src/Concerns/HasParameters.php | 1 - src/database/src/Commands/Migrations/InstallCommand.php | 2 -- src/database/src/Commands/Migrations/RefreshCommand.php | 2 -- src/database/src/Commands/Migrations/ResetCommand.php | 2 -- src/database/src/Commands/Migrations/RollbackCommand.php | 2 -- src/database/src/Commands/Migrations/StatusCommand.php | 2 -- src/database/src/Commands/Seeders/SeedCommand.php | 2 -- 7 files changed, 13 deletions(-) diff --git a/src/command/src/Concerns/HasParameters.php b/src/command/src/Concerns/HasParameters.php index 289b938c7f..6f56262c65 100644 --- a/src/command/src/Concerns/HasParameters.php +++ b/src/command/src/Concerns/HasParameters.php @@ -9,7 +9,6 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ - namespace Hyperf\Command\Concerns; use Symfony\Component\Console\Input\InputArgument; diff --git a/src/database/src/Commands/Migrations/InstallCommand.php b/src/database/src/Commands/Migrations/InstallCommand.php index b80be87e6b..281479209e 100755 --- a/src/database/src/Commands/Migrations/InstallCommand.php +++ b/src/database/src/Commands/Migrations/InstallCommand.php @@ -39,8 +39,6 @@ public function handle(): void /** * Get the console command options. - * - * @return array */ protected function getOptions(): array { diff --git a/src/database/src/Commands/Migrations/RefreshCommand.php b/src/database/src/Commands/Migrations/RefreshCommand.php index c71cbebcb4..8097347320 100755 --- a/src/database/src/Commands/Migrations/RefreshCommand.php +++ b/src/database/src/Commands/Migrations/RefreshCommand.php @@ -115,8 +115,6 @@ protected function runSeeder(string $database): void /** * Get the console command options. - * - * @return array */ protected function getOptions(): array { diff --git a/src/database/src/Commands/Migrations/ResetCommand.php b/src/database/src/Commands/Migrations/ResetCommand.php index 6c81eea700..791820f5b1 100755 --- a/src/database/src/Commands/Migrations/ResetCommand.php +++ b/src/database/src/Commands/Migrations/ResetCommand.php @@ -54,8 +54,6 @@ public function handle() /** * Get the console command options. - * - * @return array */ protected function getOptions(): array { diff --git a/src/database/src/Commands/Migrations/RollbackCommand.php b/src/database/src/Commands/Migrations/RollbackCommand.php index 1201fc93e5..a724c1032c 100755 --- a/src/database/src/Commands/Migrations/RollbackCommand.php +++ b/src/database/src/Commands/Migrations/RollbackCommand.php @@ -50,8 +50,6 @@ public function handle() /** * Get the console command options. - * - * @return array */ protected function getOptions(): array { diff --git a/src/database/src/Commands/Migrations/StatusCommand.php b/src/database/src/Commands/Migrations/StatusCommand.php index 5fa1cd3313..ea9351492f 100644 --- a/src/database/src/Commands/Migrations/StatusCommand.php +++ b/src/database/src/Commands/Migrations/StatusCommand.php @@ -77,8 +77,6 @@ protected function getAllMigrationFiles() /** * Get the console command options. - * - * @return array */ protected function getOptions(): array { diff --git a/src/database/src/Commands/Seeders/SeedCommand.php b/src/database/src/Commands/Seeders/SeedCommand.php index ba2c9d7499..13332e54d8 100644 --- a/src/database/src/Commands/Seeders/SeedCommand.php +++ b/src/database/src/Commands/Seeders/SeedCommand.php @@ -48,8 +48,6 @@ public function handle() /** * Get the console command options. - * - * @return array */ protected function getOptions(): array { From 91952697448c8d5e34fcfb22c90d4586d8e7aba8 Mon Sep 17 00:00:00 2001 From: 10966 Date: Tue, 5 Mar 2024 03:56:30 +0000 Subject: [PATCH 7/7] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/command/src/Concerns/NullDisableEventDispatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/src/Concerns/NullDisableEventDispatcher.php b/src/command/src/Concerns/NullDisableEventDispatcher.php index 81fdee5701..1598b6f9e8 100644 --- a/src/command/src/Concerns/NullDisableEventDispatcher.php +++ b/src/command/src/Concerns/NullDisableEventDispatcher.php @@ -19,7 +19,7 @@ public function addDisableDispatcherOption(): void { } - public function disableDispatcher(InputInterface $input) + public function disableDispatcher(InputInterface $input): void { } }