blank_line_after_namespace.rst 830 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ===================================
  2. Rule ``blank_line_after_namespace``
  3. ===================================
  4. There MUST be one blank line after the namespace declaration.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. namespace Sample\Sample;
  14. -
  15. $a;
  16. Example #2
  17. ~~~~~~~~~~
  18. .. code-block:: diff
  19. --- Original
  20. +++ New
  21. <?php
  22. namespace Sample\Sample;
  23. +
  24. Class Test{}
  25. Rule sets
  26. ---------
  27. The rule is part of the following rule sets:
  28. - `@PER <./../../ruleSets/PER.rst>`_
  29. - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  30. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  31. - `@PSR2 <./../../ruleSets/PSR2.rst>`_
  32. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  33. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  34. - `@Symfony <./../../ruleSets/Symfony.rst>`_