From 910bdccca24d84421eb8cc6026681fdffcc2f029 Mon Sep 17 00:00:00 2001 From: someniatko Date: Wed, 20 Jul 2022 23:59:30 +0300 Subject: [PATCH] add precise return types to Error#get() and Success#get() --- src/Error.php | 1 + src/Success.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Error.php b/src/Error.php index f88902b..1387ddf 100644 --- a/src/Error.php +++ b/src/Error.php @@ -37,6 +37,7 @@ public function chain(callable $map): ResultInterface return $this; } + /** @return TError */ public function get() { return $this->value; diff --git a/src/Success.php b/src/Success.php index be02bdd..b83fe33 100644 --- a/src/Success.php +++ b/src/Success.php @@ -36,6 +36,7 @@ public function chain(callable $map): ResultInterface return $map($this->value); } + /** @return TSuccess */ public function get() { return $this->value;