Skip to content

Commit

Permalink
Merge pull request #64 from worksome/JIRA-13725_blank-line-before-sta…
Browse files Browse the repository at this point in the history
…tement

feat(ecs): JIRA-13725 Add `blank_line_before_statement`
  • Loading branch information
owenvoke authored Oct 11, 2024
2 parents 2b5cff3 + 3762abe commit f13f5f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/GenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$path = sprintf('%s/%s', getcwd(), $newFile);
if (file_exists($path)) {
$output->writeln("$newFile already exist. Skipping...");

continue;
}

Expand Down
2 changes: 2 additions & 0 deletions src/WorksomeEcsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer;
use PhpCsFixer\Fixer\Semicolon\NoEmptyStatementFixer;
use PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer;
use PhpCsFixer\Fixer\Whitespace\BlankLineBeforeStatementFixer;
use PhpCsFixer\Fixer\Whitespace\LineEndingFixer;
use PhpCsFixer\Fixer\Whitespace\TypesSpacesFixer;
use SlevomatCodingStandard\Sniffs\Classes\ClassConstantVisibilitySniff;
Expand Down Expand Up @@ -202,6 +203,7 @@ public static function setup(ECSConfig $ecsConfig): void
TypesSpacesFixer::class,
PascalCasingEnumCasesSniff::class,
SingleQuoteFixer::class,
BlankLineBeforeStatementFixer::class,
]);
}

Expand Down
1 change: 1 addition & 0 deletions tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ function hasError(array $errorsOnLine, string $sniffCode): bool

if ($errorSource === $sniffCode) {
$hasError = true;

break;
}
}
Expand Down

0 comments on commit f13f5f3

Please sign in to comment.