Skip to content

Commit 17502eb

Browse files
authored
Prefer comma over || for match conditions (#4564)
1 parent a52e5f8 commit 17502eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

language/control-structures/match.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ string(11) "young adult"
290290
$text = 'Bienvenue chez nous';
291291
292292
$result = match (true) {
293-
str_contains($text, 'Welcome') || str_contains($text, 'Hello') => 'en',
294-
str_contains($text, 'Bienvenue') || str_contains($text, 'Bonjour') => 'fr',
293+
str_contains($text, 'Welcome'), str_contains($text, 'Hello') => 'en',
294+
str_contains($text, 'Bienvenue'), str_contains($text, 'Bonjour') => 'fr',
295295
// ...
296296
};
297297

0 commit comments

Comments
 (0)