There must be no sprintf
calls with only the first argument.
Risky when if the sprintf
function is overridden.
--- Original
+++ New
<?php
-$foo = sprintf('bar');
+$foo = 'bar';
The rule is part of the following rule sets:
- Fixer class: PhpCsFixer\Fixer\FunctionNotation\NoUselessSprintfFixer
- Test class: PhpCsFixer\Tests\Fixer\FunctionNotation\NoUselessSprintfFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.