single_line_after_imports.rst 954 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ==================================
  2. Rule ``single_line_after_imports``
  3. ==================================
  4. Each namespace use MUST go on its own line and there MUST be one blank line
  5. after the use statements block.
  6. Examples
  7. --------
  8. Example #1
  9. ~~~~~~~~~~
  10. .. code-block:: diff
  11. --- Original
  12. +++ New
  13. <?php
  14. namespace Foo;
  15. use Bar;
  16. use Baz;
  17. +
  18. final class Example
  19. {
  20. }
  21. Example #2
  22. ~~~~~~~~~~
  23. .. code-block:: diff
  24. --- Original
  25. +++ New
  26. <?php
  27. namespace Foo;
  28. use Bar;
  29. use Baz;
  30. -
  31. final class Example
  32. {
  33. }
  34. Rule sets
  35. ---------
  36. The rule is part of the following rule sets:
  37. - `@PER <./../../ruleSets/PER.rst>`_
  38. - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  39. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  40. - `@PSR2 <./../../ruleSets/PSR2.rst>`_
  41. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  42. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  43. - `@Symfony <./../../ruleSets/Symfony.rst>`_