We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a78010 commit 86d9427Copy full SHA for 86d9427
tests/Unit/Complex/FullNameTest.php
@@ -59,15 +59,11 @@
59
});
60
61
test('full name is macroable', function () {
62
- FullName::macro('surname', function () {
63
- return $this->split[1];
64
- });
+ FullName::macro('surname', fn () => $this->split[1]);
65
$valueObject = new FullName('Anna Ewa Kowalska');
66
$this->assertSame('Ewa', $valueObject->surname());
67
68
- FullName::macro('inverse', function () {
69
- return $this->split = $this->split->reverse();
70
+ FullName::macro('inverse', fn () => $this->split = $this->split->reverse());
71
$valueObject = new FullName('Nowak-Kowalska Ewa Anna');
72
$valueObject->inverse();
73
$this->assertSame('Anna', $valueObject->firstName());
0 commit comments