lowercase_cast.rst 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. =======================
  2. Rule ``lowercase_cast``
  3. =======================
  4. Cast should be written in lower case.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. - $a = (BOOLEAN) $b;
  14. - $a = (BOOL) $b;
  15. - $a = (INTEGER) $b;
  16. - $a = (INT) $b;
  17. - $a = (DOUBLE) $b;
  18. - $a = (FLoaT) $b;
  19. - $a = (flOAT) $b;
  20. - $a = (sTRING) $b;
  21. - $a = (ARRAy) $b;
  22. - $a = (OBJect) $b;
  23. - $a = (UNset) $b;
  24. - $a = (Binary) $b;
  25. + $a = (boolean) $b;
  26. + $a = (bool) $b;
  27. + $a = (integer) $b;
  28. + $a = (int) $b;
  29. + $a = (double) $b;
  30. + $a = (float) $b;
  31. + $a = (float) $b;
  32. + $a = (string) $b;
  33. + $a = (array) $b;
  34. + $a = (object) $b;
  35. + $a = (unset) $b;
  36. + $a = (binary) $b;
  37. Rule sets
  38. ---------
  39. The rule is part of the following rule sets:
  40. - `@PER <./../../ruleSets/PER.rst>`_
  41. - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  42. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  43. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  44. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  45. - `@Symfony <./../../ruleSets/Symfony.rst>`_