From 1d7ba137ad23df8d18adc2ae21bb7c2660a190fc Mon Sep 17 00:00:00 2001 From: Ujjwal Ojha Date: Tue, 5 Nov 2024 15:56:54 +1100 Subject: [PATCH] Improve the method signature of Option::fromValue to better understand nullable value --- src/PhpOption/Option.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PhpOption/Option.php b/src/PhpOption/Option.php index 91fab9c..1e7817e 100644 --- a/src/PhpOption/Option.php +++ b/src/PhpOption/Option.php @@ -36,9 +36,10 @@ abstract class Option implements IteratorAggregate * case, and everything else as Some. * * @template S + * @template P * - * @param S $value The actual return value. - * @param S $noneValue The value which should be considered "None"; null by + * @param S|P $value The actual return value. + * @param P $noneValue The value which should be considered "None"; null by * default. * * @return Option