Skip to content

Commit

Permalink
Update functions-when.md
Browse files Browse the repository at this point in the history
Callback in "when" has to return a value
  • Loading branch information
pospjan authored Sep 7, 2023
1 parent c1a9543 commit e2ef1ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/functions-testing-tools/functions-when.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The last of the when-related methods allows to make a function behave just like

```php
Functions\when('duplicate')->alias(function($value) {
"Was ".$value.", now is ".($value * 2);
return "Was ".$value.", now is ".($value * 2);
});

Functions\when('bigger')->alias('strtoupper');
Expand Down

0 comments on commit e2ef1ef

Please sign in to comment.