no_homoglyph_names.rst 778 B

1234567891011121314151617181920212223242526272829303132333435
  1. ===========================
  2. Rule ``no_homoglyph_names``
  3. ===========================
  4. Replace accidental usage of homoglyphs (non ascii characters) in names.
  5. .. warning:: Using this rule is risky.
  6. Renames classes and cannot rename the files. You might have string references
  7. to renamed code (``$$name``).
  8. Examples
  9. --------
  10. Example #1
  11. ~~~~~~~~~~
  12. .. code-block:: diff
  13. --- Original
  14. +++ New
  15. @@ -1 +1 @@
  16. -<?php $nаmе = 'wrong "a" character';
  17. +<?php $name = 'wrong "a" character';
  18. Rule sets
  19. ---------
  20. The rule is part of the following rule sets:
  21. @Symfony:risky
  22. Using the ``@Symfony:risky`` rule set will enable the ``no_homoglyph_names`` rule.
  23. @PhpCsFixer:risky
  24. Using the ``@PhpCsFixer:risky`` rule set will enable the ``no_homoglyph_names`` rule.