Skip to content

Commit

Permalink
Merge pull request #140 from pospjan/patch-1
Browse files Browse the repository at this point in the history
Update functions-when.md - callback in alias has to return a value
  • Loading branch information
gmazzap authored Sep 7, 2023
2 parents c1a9543 + e2ef1ef commit 9ee7c0a
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 9ee7c0a

Please sign in to comment.