diff --git a/src/Option.php b/src/Option.php index be6c96e..fcef59e 100644 --- a/src/Option.php +++ b/src/Option.php @@ -35,6 +35,7 @@ public static function none(): None } /** + * @psalm-pure * @template TNew * @param TNew|null $value * @return Option @@ -47,6 +48,7 @@ public static function fromNullable($value): Option } /** + * @psalm-pure * @template T * @param list> $options * @return Option> diff --git a/src/Result.php b/src/Result.php index 138a0be..d5cad2c 100644 --- a/src/Result.php +++ b/src/Result.php @@ -37,6 +37,7 @@ public static function error($value): Error /** * Filters and extracts values only of Success results from the given array. * + * @psalm-pure * @template S * @param list> $results * @return list @@ -67,6 +68,7 @@ public static function extractSuccesses(array $results): array /** * Filters and extracts values only of Error results from the given array. * + * @psalm-pure * @template E * @param list> $results * @return list