From da57aa97306f0f623638ef1e2ea0bf6a98e3718d Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Sat, 22 Apr 2023 23:52:28 +0200 Subject: [PATCH] Add remaining missing return types to safe methods --- Command/AbstractFailedMessagesCommand.php | 2 +- Handler/HandlerDescriptor.php | 2 +- Transport/Serialization/PhpSerializer.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Command/AbstractFailedMessagesCommand.php b/Command/AbstractFailedMessagesCommand.php index 3bb31bab..28aedeb1 100644 --- a/Command/AbstractFailedMessagesCommand.php +++ b/Command/AbstractFailedMessagesCommand.php @@ -208,7 +208,7 @@ protected function printWarningAvailableFailureTransports(SymfonyStyle $io, ?str } } - protected function interactiveChooseFailureTransport(SymfonyStyle $io) + protected function interactiveChooseFailureTransport(SymfonyStyle $io): string { $failedTransports = array_keys($this->failureTransports->getProvidedServices()); $question = new ChoiceQuestion('Select failed transport:', $failedTransports, 0); diff --git a/Handler/HandlerDescriptor.php b/Handler/HandlerDescriptor.php index 821754b3..98d0bced 100644 --- a/Handler/HandlerDescriptor.php +++ b/Handler/HandlerDescriptor.php @@ -69,7 +69,7 @@ public function getBatchHandler(): ?BatchHandlerInterface return $this->batchHandler; } - public function getOption(string $option) + public function getOption(string $option): mixed { return $this->options[$option] ?? null; } diff --git a/Transport/Serialization/PhpSerializer.php b/Transport/Serialization/PhpSerializer.php index da08f21d..b1cb42d7 100644 --- a/Transport/Serialization/PhpSerializer.php +++ b/Transport/Serialization/PhpSerializer.php @@ -112,7 +112,7 @@ private function safelyUnserialize(string $contents): Envelope /** * @internal */ - public static function handleUnserializeCallback(string $class) + public static function handleUnserializeCallback(string $class): never { throw new MessageDecodingFailedException(sprintf('Message class "%s" not found during decoding.', $class)); }