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 f9cc5a0 commit 936b116Copy full SHA for 936b116
tests/Set/Fixture/match_maintains_return_condition.php.inc
@@ -0,0 +1,35 @@
1
+<?php
2
+
3
+namespace Rector\Tests\Set\Fixture;
4
5
+final class MatchBoolean
6
+{
7
+ public function run($value, $booleanFlag)
8
+ {
9
+ return match (true) {
10
+ $value === 2 => true,
11
+ default => false,
12
+ } && $booleanFlag;
13
+ }
14
+}
15
16
+?>
17
+-----
18
19
20
21
22
23
24
25
26
+ switch (true) {
27
+ case $value === 2:
28
+ return true && $booleanFlag;
29
+ default:
30
+ return false && $booleanFlag;
31
32
33
34
35
0 commit comments