no_leading_namespace_whitespace.rst 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ========================================
  2. Rule ``no_leading_namespace_whitespace``
  3. ========================================
  4. The namespace declaration line shouldn't contain leading whitespace.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. - namespace Test8a;
  14. - namespace Test8b;
  15. +namespace Test8a;
  16. +namespace Test8b;
  17. Rule sets
  18. ---------
  19. The rule is part of the following rule sets:
  20. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  21. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  22. References
  23. ----------
  24. - Fixer class: `PhpCsFixer\\Fixer\\NamespaceNotation\\NoLeadingNamespaceWhitespaceFixer <./../../../src/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixer.php>`_
  25. - Test class: `PhpCsFixer\\Tests\\Fixer\\NamespaceNotation\\NoLeadingNamespaceWhitespaceFixerTest <./../../../tests/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixerTest.php>`_
  26. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.