-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
This comes from here.
Since it is an upstream issue, I am reporting it here.
This file contents trigger the notice there must be exactly one blank line after the file comment
(note that there is a blank line after the comment, and even if adding more than one blank line won't change this message)
<?php
/**
* Intentionally empty file.
*
* It exists to stop directory listings on poorly configured servers.
*
* @package whatever
*/
This does not trigger that warning:
(note that the only difference is we added something after the blank line after comment)
<?php
/**
* Intentionally empty file.
*
* It exists to stop directory listings on poorly configured servers.
*
* @package whatever
*/
echo 'this';
I don't think it is OK to assume there will be code in any case in a file, even when there is a comment.
Thus, the warning is faulty and should probably only trigger if there is really no empty line after comment, which is clearly not the case here.