From 313726f1c09f5ced6fb9b54c01e2d9c447ea74a3 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 2 Apr 2026 17:11:31 +0200 Subject: [PATCH] refactor(commands): Add return types Signed-off-by: Carl Schwan --- lib/Command/DeleteProvider.php | 4 ++-- lib/Command/ListProviders.php | 4 ++-- lib/Command/UpsertProvider.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Command/DeleteProvider.php b/lib/Command/DeleteProvider.php index 1d064a46d..aeb432a32 100644 --- a/lib/Command/DeleteProvider.php +++ b/lib/Command/DeleteProvider.php @@ -30,7 +30,7 @@ public function __construct( parent::__construct(); } - protected function configure() { + protected function configure(): void { $this ->setName('user_oidc:provider:delete') ->setDescription('Delete an OpenId connect provider') @@ -39,7 +39,7 @@ protected function configure() { parent::configure(); } - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { try { $identifier = $input->getArgument('identifier'); try { diff --git a/lib/Command/ListProviders.php b/lib/Command/ListProviders.php index 029663415..6bfbb59d3 100644 --- a/lib/Command/ListProviders.php +++ b/lib/Command/ListProviders.php @@ -26,7 +26,7 @@ public function __construct( parent::__construct(); } - protected function configure() { + protected function configure(): void { $this ->setName('user_oidc:providers') ->setDescription('List all providers and print their configuration') @@ -35,7 +35,7 @@ protected function configure() { parent::configure(); } - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $outputFormat = $input->getOption('output') ?? 'json_pretty'; $sensitive = $input->getOption('sensitive'); diff --git a/lib/Command/UpsertProvider.php b/lib/Command/UpsertProvider.php index 985bdf7f5..24a8da239 100644 --- a/lib/Command/UpsertProvider.php +++ b/lib/Command/UpsertProvider.php @@ -171,7 +171,7 @@ public function __construct( parent::__construct(); } - protected function configure() { + protected function configure(): void { $this ->setName('user_oidc:provider') ->setDescription('Create, show or update a OpenId connect provider config given the identifier of a provider') @@ -190,7 +190,7 @@ protected function configure() { parent::configure(); } - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $outputFormat = $input->getOption('output') ?? 'table'; $identifier = $input->getArgument('identifier'); @@ -279,7 +279,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { return 0; } - private function listProviders(InputInterface $input, OutputInterface $output) { + private function listProviders(InputInterface $input, OutputInterface $output): int { $outputFormat = $input->getOption('output') ?? 'table'; $providers = $this->providerMapper->getProviders();