Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoBlankLinesAfterPhpdocFixer — Do not strip newline between docblock and use statements #4676

Open
wants to merge 2 commits into
base: master
from

Conversation

@mollierobbert
Copy link

mollierobbert commented Nov 30, 2019

When a docblock is followed by a use statement, it is most likely a file-level docblock. File-level docblocks should be followed by a newline as per the phpDoc standard: https://docs.phpdoc.org/getting-started/your-first-set-of-documentation.html

Example:

<?php
/**
 * Some license info.
 */

use Foo\Bar;

/**
 * My class.
 */
class MyClass
...
…is most likely a file-level documentation block. Do not strip the newline after the documentation block in those cases.
@mollierobbert mollierobbert changed the title Do not strip newline between docblock and namespace or use statements NoBlankLinesAfterPhpdocFixer — Do not strip newline between docblock and namespace or use statements Nov 30, 2019
… already covered by the SingleBlankLineBeforeNamespaceFixer.
@mollierobbert mollierobbert changed the title NoBlankLinesAfterPhpdocFixer — Do not strip newline between docblock and namespace or use statements NoBlankLinesAfterPhpdocFixer — Do not strip newline between docblock and use statements Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.