Skip to content

Commit

Permalink
relax: Remove SingleSpaceAfterStatementFixer
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Jul 27, 2024
1 parent 2b22e8a commit 6e0dd21
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/RuleSet/Sets/Relax.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public function mainRules(): array
Fixer\PhpdocSelfAccessorFixer::name() => true,
Fixer\PhpdocTypesCommaSpacesFixer::name() => true,
Fixer\PhpdocTypesTrimFixer::name() => true,
Fixer\SingleSpaceAfterStatementFixer::name() => ['allow_linebreak' => true],
Fixer\SingleSpaceBeforeStatementFixer::name() => true,

/*
Expand Down
7 changes: 7 additions & 0 deletions tests/Fixtures/Ruleset/relax_actual.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ public function language_construct__single_space_around_construct()
$foo = new Foo();
echo$foo->bar();
throw new \Exception();

// line break
// menggantikan PhpCsFixerCustomFixers\Fixer\SingleSpaceAfterStatementFixer
$b = new
Foo();
echo
true;
}

public function list_notation__list_syntax()
Expand Down
4 changes: 4 additions & 0 deletions tests/Fixtures/Ruleset/relax_expected.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ public function language_construct__single_space_around_construct()
$foo = new Foo;
echo $foo->bar();
throw new \Exception;
// line break
// menggantikan PhpCsFixerCustomFixers\Fixer\SingleSpaceAfterStatementFixer
$b = new Foo;
echo true;
}

public function list_notation__list_syntax()
Expand Down

0 comments on commit 6e0dd21

Please sign in to comment.