From 9972ee01a8622177023956846b9e4c2ad4a703ab Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Fri, 10 Jan 2020 10:11:01 +0200 Subject: [PATCH] Drop phpdoc template parameter as it cannot be not used (psalm doesn't provide support use it in something like `@psalm-throws`) (#6) Fixes #5 --- src/Option.php | 5 +---- src/Option/None.php | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Option.php b/src/Option.php index e2d4831..0e9cbbd 100644 --- a/src/Option.php +++ b/src/Option.php @@ -40,10 +40,7 @@ abstract public function isNone(): bool; /** * Unwraps a result, yielding the content of a Some. * - * @template X as Exception - * * @param Exception $msg - * @psalm-param X&Exception $msg * @return mixed * @psalm-return T * @throws Exception the message if the value is a None. @@ -269,4 +266,4 @@ public static function fromFirst($iterable): Option return new None; } -} \ No newline at end of file +} diff --git a/src/Option/None.php b/src/Option/None.php index fa350c4..22e338f 100644 --- a/src/Option/None.php +++ b/src/Option/None.php @@ -63,10 +63,7 @@ public function isNone(): bool /** * Unwraps a result, yielding the content of a Some. * - * @template X as Exception - * * @param Exception $msg - * @psalm-param X&Exception $msg * @return void * @psalm-return never-return * @throws Exception the message if the value is a None. @@ -286,4 +283,4 @@ public function with(...$args): Option return $this; } -} \ No newline at end of file +}