no_space_around_double_colon.rst 958 B

12345678910111213141516171819202122232425262728293031323334353637
  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 echo Foo\Bar :: class;
  14. +<?php echo Foo\Bar::class;
  15. Rule sets
  16. ---------
  17. The rule is part of the following rule sets:
  18. @PSR12
  19. Using the `@PSR12 <./../../ruleSets/PSR12.rst>`_ rule set will enable the ``no_space_around_double_colon`` rule.
  20. @PSR2
  21. Using the `@PSR2 <./../../ruleSets/PSR2.rst>`_ rule set will enable the ``no_space_around_double_colon`` rule.
  22. @PhpCsFixer
  23. Using the `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ rule set will enable the ``no_space_around_double_colon`` rule.
  24. @Symfony
  25. Using the `@Symfony <./../../ruleSets/Symfony.rst>`_ rule set will enable the ``no_space_around_double_colon`` rule.