Each namespace use MUST go on its own line and there MUST be one blank line after the use statements block.
--- Original
+++ New
<?php
namespace Foo;
use Bar;
use Baz;
+
final class Example
{
}
--- Original
+++ New
<?php
namespace Foo;
use Bar;
use Baz;
-
final class Example
{
}
The rule is part of the following rule sets:
- Fixer class: PhpCsFixer\Fixer\Import\SingleLineAfterImportsFixer
- Test class: PhpCsFixer\Tests\Fixer\Import\SingleLineAfterImportsFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.