no_space_around_double_colon.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. =====================================
  2. Rule ``no_space_around_double_colon``
  3. =====================================
  4. There must be no space around double colons (also called Scope Resolution
  5. Operator or Paamayim Nekudotayim).
  6. Examples
  7. --------
  8. Example #1
  9. ~~~~~~~~~~
  10. .. code-block:: diff
  11. --- Original
  12. +++ New
  13. <?php
  14. -echo Foo\Bar :: class;
  15. +echo Foo\Bar::class;
  16. Rule sets
  17. ---------
  18. The rule is part of the following rule sets:
  19. - `@PER <./../../ruleSets/PER.rst>`_
  20. - `@PER-CS <./../../ruleSets/PER-CS.rst>`_
  21. - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  22. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  23. - `@PSR2 <./../../ruleSets/PSR2.rst>`_
  24. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  25. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  26. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  27. References
  28. ----------
  29. - Fixer class: `PhpCsFixer\\Fixer\\Operator\\NoSpaceAroundDoubleColonFixer <./../../../src/Fixer/Operator/NoSpaceAroundDoubleColonFixer.php>`_
  30. - Test class: `PhpCsFixer\\Tests\\Fixer\\Operator\\NoSpaceAroundDoubleColonFixerTest <./../../../tests/Fixer/Operator/NoSpaceAroundDoubleColonFixerTest.php>`_
  31. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.