single_blank_line_at_eof.rst 814 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. =================================
  2. Rule ``single_blank_line_at_eof``
  3. =================================
  4. A PHP file without end tag must always end with a single empty line feed.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. -$a = 1;
  14. \ No newline at end of file
  15. +$a = 1;
  16. Example #2
  17. ~~~~~~~~~~
  18. .. code-block:: diff
  19. --- Original
  20. +++ New
  21. <?php
  22. $a = 1;
  23. -
  24. Rule sets
  25. ---------
  26. The rule is part of the following rule sets:
  27. - `@PER <./../../ruleSets/PER.rst>`_
  28. - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  29. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  30. - `@PSR2 <./../../ruleSets/PSR2.rst>`_
  31. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  32. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  33. - `@Symfony <./../../ruleSets/Symfony.rst>`_