Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
yceruto committed Apr 19, 2024
1 parent 84bf501 commit 0866433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function findUser(int $id): Option
return Option::from($user); // None if null, otherwise Some($user)
}

$user = findUser(1)->expect('user exists.');
$user = findUser(1)->expect('the user exists.'); // throws LogicException if it does not exist
// do something safely with $user instance...

// map the user found to a DTO or create a new one if not found
Expand Down

0 comments on commit 0866433

Please sign in to comment.