-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
NoBlankLinesAfterPhpdoc - Add T_NAMESPACE in array of forbidden successors #5791
NoBlankLinesAfterPhpdoc - Add T_NAMESPACE in array of forbidden successors #5791
Conversation
Hi and thanks for your PR! Looking good already. Could you adjust the test to only test the single issue here, maybe like: public function testWhitespaceInDocBlockAboveNamespaceIsNotTouched()
{
$expected = '<?php
/**
* This is a file-level docblock.
*/
namespace Foo\Bar\Baz;
';
$this->doTest($expected);
} Thanks! |
df3d5e0
to
328eaa4
Compare
@paulbalandan CI is failing for proposed changes |
@keradus or @SpacePossum , is it an acceptable fix to just remove the integration of the fixer against |
if there is no longer priority conflict between those two rules anymore, move test from |
fa1eddc
to
e4dd5a6
Compare
I have fixed the integration failure. Not sure if the removal of the priority comment in |
please avoid squashing the commits in future. now, I have no clue what are the newest changes and have to review from scratch :( |
we have tests for it. if CI is happy, all good |
Thank you @paulbalandan. |
Fixes #5111
When used,
no_blank_lines_after_phpdoc
removes the whitespace between the file-level doc-block and the namespace declaration. This should not be the case as namespaces are not considered structural elements that can be documented with doc-blocks. Besides, the file-level doc-block belongs to the file and NOT on the namespace.See more: https://docs.phpdoc.org/3.0/guide/getting-started/what-is-a-docblock.html