Skip to content

Commit 936b116

Browse files
committed
working test
1 parent f9cc5a0 commit 936b116

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
<?php
19+
20+
namespace Rector\Tests\Set\Fixture;
21+
22+
final class MatchBoolean
23+
{
24+
public function run($value, $booleanFlag)
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

Comments
 (0)