single_trait_insert_per_statement.rst 709 B

1234567891011121314151617181920212223242526272829303132333435
  1. ==========================================
  2. Rule ``single_trait_insert_per_statement``
  3. ==========================================
  4. Each trait ``use`` must be done as single statement.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. final class Example
  14. {
  15. - use Foo, Bar;
  16. + use Foo;use Bar;
  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. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  25. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  26. - `@Symfony <./../../ruleSets/Symfony.rst>`_