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); }