Skip to content

Commit 10c844a

Browse files
author
Nicolò Pignatelli
committed
Added psalm prefix to return annotation
1 parent a02dd4c commit 10c844a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Result/functions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @psalm-param callable(mixed...):T $f
88
* @psalm-param mixed[] $args
99
*
10-
* @return Result<T>
10+
* @psalm-return Result<T>
1111
*/
1212
function result(callable $f, ...$args): Result
1313
{
@@ -27,7 +27,7 @@ function result(callable $f, ...$args): Result
2727
* @psalm-param Result<T> $result
2828
* @psalm-param callable(T):U $successHandler
2929
* @psalm-param callable(ExceptionStack):W $errorHandler
30-
* @return U|W
30+
* @psalm-return U|W
3131
*/
3232
function handle_result(Result $result, callable $successHandler, callable $errorHandler) {
3333
switch (true) {
@@ -45,7 +45,7 @@ function handle_result(Result $result, callable $successHandler, callable $error
4545
* @template U
4646
* @psalm-param Result<T> $result
4747
* @psalm-param callable(ExceptionStack):U $errorHandler
48-
* @return T|U
48+
* @psalm-return T|U
4949
*/
5050
function extract_or_handle_failure(Result $result, callable $errorHandler) {
5151
return handle_result(

0 commit comments

Comments
 (0)