Skip to content

Commit

Permalink
Drop phpdoc template parameter as it cannot be not used (psalm doesn'…
Browse files Browse the repository at this point in the history
…t provide support use it in something like `@psalm-throws`) (#6)

Fixes #5
  • Loading branch information
andrew-demb authored and prewk committed Jan 10, 2020
1 parent e97853c commit 9972ee0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/Option.php
Expand Up @@ -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.
Expand Down Expand Up @@ -269,4 +266,4 @@ public static function fromFirst($iterable): Option

return new None;
}
}
}
5 changes: 1 addition & 4 deletions src/Option/None.php
Expand Up @@ -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.
Expand Down Expand Up @@ -286,4 +283,4 @@ public function with(...$args): Option

return $this;
}
}
}

0 comments on commit 9972ee0

Please sign in to comment.