combine_consecutive_issets.rst 457 B

123456789101112131415161718192021222324252627
  1. ===================================
  2. Rule ``combine_consecutive_issets``
  3. ===================================
  4. Using ``isset($var) &&`` multiple times should be done in one call.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. -$a = isset($a) && isset($b);
  14. +$a = isset($a, $b) ;
  15. Rule sets
  16. ---------
  17. The rule is part of the following rule set:
  18. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_