Skip to content

Commit

Permalink
minor #5323 NoUselessSprintfFixer - Fix test on PHP5.6 (SpacePossum)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.17-dev branch.

Discussion
----------

NoUselessSprintfFixer - Fix test on PHP5.6

Extracted from #5319

Commits
-------

d6a438e NoUselessSprintfFixer - Fix test on PHP5.6
  • Loading branch information
keradus committed Dec 7, 2020
2 parents 0f9eb4c + d6a438e commit ae0ea89
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/Fixer/FunctionNotation/NoUselessSprintfFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,16 @@ function sprintf($foo) {
echo sprint("%d", 1);
echo sprint("%d%d%d", 1, 2, 3);
echo sprint();
echo sprint[2]("foo");
',
];

if (\PHP_VERSION_ID >= 70000) {
yield [
'<?php echo sprint[2]("foo");
',
];
}

if (\PHP_VERSION_ID > 70300) {
yield 'trailing comma' => [
'<?php echo "bar";',
Expand Down

0 comments on commit ae0ea89

Please sign in to comment.