Skip to content

Commit 48d0b26

Browse files
authored
[10.x] Change closure to arrow function in MessageSelector (Better style code) (#46081)
* change closure to arrow function * remove collection return type
1 parent 7a83606 commit 48d0b26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Illuminate/Translation/MessageSelector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ private function extractFromString($part, $number)
8989
*/
9090
private function stripConditions($segments)
9191
{
92-
return collect($segments)->map(function ($part) {
93-
return preg_replace('/^[\{\[]([^\[\]\{\}]*)[\}\]]/', '', $part);
94-
})->all();
92+
return collect($segments)
93+
->map(fn ($part) => preg_replace('/^[\{\[]([^\[\]\{\}]*)[\}\]]/', '', $part))
94+
->all();
9595
}
9696

9797
/**

0 commit comments

Comments
 (0)