Skip to content

Commit 7901ae3

Browse files
committed
[DowngradePhp73] Handle comma in array on DowngradeFlexibleHeredocSyntaxRector
1 parent be0720b commit 7901ae3

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
namespace Rector\Tests\DowngradePhp73\Rector\String_\DowngradeFlexibleHeredocSyntaxRector\Fixture;
4+
5+
class CommaInArray
6+
{
7+
public function run()
8+
{
9+
$variable = [
10+
<<<EOT
11+
<?php
12+
/** @readonly */
13+
class C {
14+
}\n
15+
EOT,
16+
new \stdClass()
17+
];
18+
}
19+
}
20+
21+
?>
22+
-----
23+
<?php
24+
25+
namespace Rector\Tests\DowngradePhp73\Rector\String_\DowngradeFlexibleHeredocSyntaxRector\Fixture;
26+
27+
class CommaInArray
28+
{
29+
public function run()
30+
{
31+
$variable = [
32+
<<<EOT
33+
<?php
34+
/** @readonly */
35+
class C {
36+
}\n
37+
EOT
38+
,
39+
new \stdClass()
40+
];
41+
}
42+
}
43+
44+
?>

0 commit comments

Comments
 (0)