Skip to content

Commit

Permalink
#87 - no empty lines after docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofrewak committed May 14, 2024
1 parent f6246ab commit 1b1b032
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Configuration/Defaults/CommonRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
use PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer;
use PhpCsFixer\Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer;
use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer;
use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer;
Expand Down Expand Up @@ -340,5 +341,6 @@ class CommonRules extends Rules
CompactEmptyArrayFixer::class => true,
ClassKeywordFixer::class => true,
NamedArgumentFixer::class => true,
NoBlankLinesAfterPhpdocFixer::class => true,
];
}
8 changes: 8 additions & 0 deletions tests/fixtures/emptyLines/actual.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

declare(strict_types=1);

/**
* @property string $id
*/

class Test
{
}

return [
"default" => env("DB_CONNECTION", "mysql"),

Expand Down
7 changes: 7 additions & 0 deletions tests/fixtures/emptyLines/expected.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/**
* @property string $id
*/
class Test
{
}

return [
"default" => env("DB_CONNECTION", "mysql"),

Expand Down

0 comments on commit 1b1b032

Please sign in to comment.