Skip to content

Commit a97e6a2

Browse files
committed
add more fixture
1 parent 09c4834 commit a97e6a2

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
namespace Rector\Tests\Issues\ScopeNotAvailable\FixtureJsonThrowCaseSensitiveConstFetch;
4+
5+
class NonExactValueAfterUnreachableStmts
6+
{
7+
/**
8+
* @param 'foo' $foo
9+
*/
10+
public static function run($foo)
11+
{
12+
if ($foo === 'foo') {
13+
return;
14+
}
15+
16+
echo 'some statement 1';
17+
echo 'some statement 2';
18+
echo(json_encode($foo));
19+
}
20+
}
21+
22+
?>
23+
-----
24+
<?php
25+
26+
namespace Rector\Tests\Issues\ScopeNotAvailable\FixtureJsonThrowCaseSensitiveConstFetch;
27+
28+
class NonExactValueAfterUnreachableStmts
29+
{
30+
/**
31+
* @param 'foo' $foo
32+
*/
33+
public static function run($foo)
34+
{
35+
if ($foo === 'foo') {
36+
return;
37+
}
38+
39+
echo 'some statement 1';
40+
echo 'some statement 2';
41+
echo(json_encode($foo, JSON_THROW_ON_ERROR));
42+
}
43+
}
44+
45+
?>

0 commit comments

Comments
 (0)