no_blank_lines_after_class_opening.rst 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ===========================================
  2. Rule ``no_blank_lines_after_class_opening``
  3. ===========================================
  4. There should be no empty lines after class opening brace.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. final class Sample
  14. {
  15. -
  16. protected function foo()
  17. {
  18. }
  19. }
  20. Rule sets
  21. ---------
  22. The rule is part of the following rule sets:
  23. - `@PER <./../../ruleSets/PER.rst>`_
  24. - `@PER-CS <./../../ruleSets/PER-CS.rst>`_
  25. - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  26. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  27. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  28. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  29. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  30. References
  31. ----------
  32. - Fixer class: `PhpCsFixer\\Fixer\\ClassNotation\\NoBlankLinesAfterClassOpeningFixer <./../../../src/Fixer/ClassNotation/NoBlankLinesAfterClassOpeningFixer.php>`_
  33. - Test class: `PhpCsFixer\\Tests\\Fixer\\ClassNotation\\NoBlankLinesAfterClassOpeningFixerTest <./../../../tests/Fixer/ClassNotation/NoBlankLinesAfterClassOpeningFixerTest.php>`_
  34. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.