Skip to content

Commit

Permalink
add precise return types to Error#get() and Success#get()
Browse files Browse the repository at this point in the history
  • Loading branch information
someniatko committed Jul 20, 2022
1 parent ca38cd7 commit 910bdcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function chain(callable $map): ResultInterface
return $this;
}

/** @return TError */
public function get()
{
return $this->value;
Expand Down
1 change: 1 addition & 0 deletions src/Success.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function chain(callable $map): ResultInterface
return $map($this->value);
}

/** @return TSuccess */
public function get()
{
return $this->value;
Expand Down

0 comments on commit 910bdcc

Please sign in to comment.