integer_literal_case.rst 893 B

12345678910111213141516171819202122232425262728293031323334353637
  1. =============================
  2. Rule ``integer_literal_case``
  3. =============================
  4. Integer literals must be in correct case.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. -$foo = 0Xff;
  14. -$bar = 0B11111111;
  15. +$foo = 0xFF;
  16. +$bar = 0b11111111;
  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\\Casing\\IntegerLiteralCaseFixer <./../../../src/Fixer/Casing/IntegerLiteralCaseFixer.php>`_
  25. - Test class: `PhpCsFixer\\Tests\\Fixer\\Casing\\IntegerLiteralCaseFixerTest <./../../../tests/Fixer/Casing/IntegerLiteralCaseFixerTest.php>`_
  26. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.