Skip to content

Commit 910bdcc

Browse files
committed
add precise return types to Error#get() and Success#get()
1 parent ca38cd7 commit 910bdcc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Error.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function chain(callable $map): ResultInterface
3737
return $this;
3838
}
3939

40+
/** @return TError */
4041
public function get()
4142
{
4243
return $this->value;

src/Success.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function chain(callable $map): ResultInterface
3636
return $map($this->value);
3737
}
3838

39+
/** @return TSuccess */
3940
public function get()
4041
{
4142
return $this->value;

0 commit comments

Comments
 (0)