Skip to content

Commit cb6819b

Browse files
committed
add fixture for skip sprintf arg
1 parent 6b3852b commit cb6819b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
namespace Rector\Tests\DowngradePhp80\Rector\FuncCall\DowngradeSubstrFalsyRector\Fixture;
3+
4+
/**
5+
* sprintf %s format converts false to empty string
6+
*/
7+
class SkipSprintf
8+
{
9+
public function run(string $name)
10+
{
11+
return sprintf('Value: %s', substr($name, 2));
12+
}
13+
14+
public function run2(string $name)
15+
{
16+
printf('Value: %s', substr($name, 2));
17+
}
18+
}

0 commit comments

Comments
 (0)