elseif.rst 706 B

123456789101112131415161718192021222324252627282930313233343536
  1. ===============
  2. Rule ``elseif``
  3. ===============
  4. The keyword ``elseif`` should be used instead of ``else if`` so that all control
  5. keywords look like single words.
  6. Examples
  7. --------
  8. Example #1
  9. ~~~~~~~~~~
  10. .. code-block:: diff
  11. --- Original
  12. +++ New
  13. <?php
  14. if ($a) {
  15. -} else if ($b) {
  16. +} elseif ($b) {
  17. }
  18. Rule sets
  19. ---------
  20. The rule is part of the following rule sets:
  21. - `@PER <./../../ruleSets/PER.rst>`_
  22. - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  23. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  24. - `@PSR2 <./../../ruleSets/PSR2.rst>`_
  25. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  26. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  27. - `@Symfony <./../../ruleSets/Symfony.rst>`_