Skip to content

Commit f6a4e1c

Browse files
committed
switch back to PHP7.4 short closures
1 parent d5d6367 commit f6a4e1c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"astrotomic/php-conditional-proxy": "^0.2.0"
2020
},
2121
"require-dev": {
22+
"php": "^7.4",
2223
"pestphp/pest": "^0.3.0",
2324
"spatie/pest-plugin-snapshots": "^0.3.0"
2425
},

tests/GlobalTypesTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,8 @@ public function __toString()
6666
->url('http://www.example.com')
6767
->description('Description')
6868
->locale('en_US')
69-
->when(false, function (Website $og) {
70-
$og->alternateLocale('de_DE');
71-
})
72-
->when(true, function (Website $og) {
73-
$og->alternateLocale('en_GB');
74-
})
69+
->when(false, fn (Website $og) => $og->alternateLocale('de_DE'))
70+
->when(true, fn (Website $og) => $og->alternateLocale('en_GB'))
7571
->siteName('Example')
7672
->image('http://www.example.com/image1.jpg');
7773

0 commit comments

Comments
 (0)