File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
tests/Issues/ScopeNotAvailable/FixtureJsonThrowCaseSensitiveConstFetch Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 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+ ?>
You can’t perform that action at this time.
0 commit comments