no_blank_lines_before_namespace.rst 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ========================================
  2. Rule ``no_blank_lines_before_namespace``
  3. ========================================
  4. There should be no blank lines before a namespace declaration.
  5. Warning
  6. -------
  7. This rule is deprecated and will be removed in the next major version
  8. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  9. You should use ``blank_lines_before_namespace`` instead.
  10. Examples
  11. --------
  12. Example #1
  13. ~~~~~~~~~~
  14. .. code-block:: diff
  15. --- Original
  16. +++ New
  17. <?php
  18. -
  19. -
  20. -
  21. namespace Example;
  22. References
  23. ----------
  24. - Fixer class: `PhpCsFixer\\Fixer\\NamespaceNotation\\NoBlankLinesBeforeNamespaceFixer <./../../../src/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixer.php>`_
  25. - Test class: `PhpCsFixer\\Tests\\Fixer\\NamespaceNotation\\NoBlankLinesBeforeNamespaceFixerTest <./../../../tests/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixerTest.php>`_
  26. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.