From 3e71e524de23d1315697608250fda118c7f3a787 Mon Sep 17 00:00:00 2001 From: Pablo Largo Mohedano Date: Mon, 25 Dec 2023 12:22:36 +0100 Subject: [PATCH] Removed conditional return --- src/Psl/Option/Option.php | 6 +----- tests/static-analysis/Option/zip.php | 8 ++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Psl/Option/Option.php b/src/Psl/Option/Option.php index b18bf915..1d99e64c 100644 --- a/src/Psl/Option/Option.php +++ b/src/Psl/Option/Option.php @@ -315,11 +315,7 @@ public function equals(mixed $other): bool * * @param Option $other The other `Option` to zip with. * - * @return ( - * T is never - * ? Option - * : (Tu is never ? Option : Option) - * ) + * @return Option The resulting `Option` containing the combined tuple or `None`. */ public function zip(Option $other): Option { diff --git a/tests/static-analysis/Option/zip.php b/tests/static-analysis/Option/zip.php index f93a9044..8388dbfe 100644 --- a/tests/static-analysis/Option/zip.php +++ b/tests/static-analysis/Option/zip.php @@ -6,7 +6,7 @@ use Psl\Type; /** - * @return Option\Option + * @return Option\Option */ function test_partial_none_tuple_1(): Option\Option { @@ -14,7 +14,7 @@ function test_partial_none_tuple_1(): Option\Option } /** - * @return Option\Option + * @return Option\Option */ function test_partial_none_tuple_2(): Option\Option { @@ -24,7 +24,7 @@ function test_partial_none_tuple_2(): Option\Option /** * @throws Type\Exception\AssertException * - * @return array{Option\Option, Option\Option} + * @return array{Option\Option, Option\Option} */ function test_partial_none_unzip_1(): array { @@ -42,7 +42,7 @@ function test_some_zip(): Option\Option /** * @throws Type\Exception\AssertException * - * @return array{Option\Option, Option\Option} + * @return array{Option\Option, Option\Option} */ function test_partial_none_unzip_2(): array {