long_to_shorthand_operator.rst 469 B

12345678910111213141516171819202122232425262728
  1. ===================================
  2. Rule ``long_to_shorthand_operator``
  3. ===================================
  4. Shorthand notation for operators should be used if possible.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. -$i = $i + 10;
  14. +$i += 10;
  15. Rule sets
  16. ---------
  17. The rule is part of the following rule sets:
  18. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  19. - `@Symfony <./../../ruleSets/Symfony.rst>`_