single_blank_line_before_namespace.rst 671 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ===========================================
  2. Rule ``single_blank_line_before_namespace``
  3. ===========================================
  4. There should be exactly one blank line before a namespace declaration.
  5. Warning
  6. -------
  7. This rule is deprecated and will be removed on 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 namespace A {}
  18. +<?php
  19. +
  20. +namespace A {}
  21. Example #2
  22. ~~~~~~~~~~
  23. .. code-block:: diff
  24. --- Original
  25. +++ New
  26. <?php
  27. -
  28. namespace A{}