From ddaf22422b40c5a823f9125f755667825df7e56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20H=C3=A4u=C3=9Fler?= Date: Mon, 11 Dec 2023 07:58:01 +0100 Subject: [PATCH] [TASK] Remove superfluous nullable return types --- src/IO/Validator/NotEmptyValidator.php | 2 +- tests/src/Fixtures/ModifyingValidator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IO/Validator/NotEmptyValidator.php b/src/IO/Validator/NotEmptyValidator.php index eaafae86..d7bfc39f 100644 --- a/src/IO/Validator/NotEmptyValidator.php +++ b/src/IO/Validator/NotEmptyValidator.php @@ -41,7 +41,7 @@ final class NotEmptyValidator extends AbstractValidator 'strict' => false, ]; - public function __invoke(?string $input): ?string + public function __invoke(?string $input): string { if (null === $input || '' === $input) { throw Exception\ValidationException::create('The given input must not be empty.'); diff --git a/tests/src/Fixtures/ModifyingValidator.php b/tests/src/Fixtures/ModifyingValidator.php index 4a9bf6a2..918ee7c2 100644 --- a/tests/src/Fixtures/ModifyingValidator.php +++ b/tests/src/Fixtures/ModifyingValidator.php @@ -41,7 +41,7 @@ final class ModifyingValidator extends IO\Validator\AbstractValidator { private const TYPE = 'modifying'; - public function __invoke(?string $input): ?string + public function __invoke(?string $input): string { return strtoupper((string) $input); }