magic_constant_casing.rst 572 B

12345678910111213141516171819202122232425262728293031
  1. ==============================
  2. Rule ``magic_constant_casing``
  3. ==============================
  4. Magic constants should be referred to using the correct casing.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. @@ -1,2 +1,2 @@
  13. <?php
  14. -echo __dir__;
  15. +echo __DIR__;
  16. Rule sets
  17. ---------
  18. The rule is part of the following rule sets:
  19. @Symfony
  20. Using the ``@Symfony`` rule set will enable the ``magic_constant_casing`` rule.
  21. @PhpCsFixer
  22. Using the ``@PhpCsFixer`` rule set will enable the ``magic_constant_casing`` rule.