Skip to content

Commit

Permalink
Enhancement: Enable ErickSkrauch/line_break_after_statements fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Sep 19, 2023
1 parent 5cd9b3d commit e9efb55
Show file tree
Hide file tree
Showing 26 changed files with 197 additions and 24 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

For a full diff see [`6.0.0...main`][6.0.0...main].

### Changed

- Required [`erickskrauch/php-cs-fixer-custom-fixers`](https://github.com/erickskrauch/php-cs-fixer-custom-fixers) and enabled the `ErickSkrauch/line_break_after_statements` fixer ([#889]), by [@localheinz]

## [`6.0.0`][6.0.0]

For a full diff see [`5.16.0...6.0.0`][5.16.0...6.0.0].
Expand Down Expand Up @@ -1211,6 +1215,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#886]: https://github.com/ergebnis/php-cs-fixer-config/pull/886
[#887]: https://github.com/ergebnis/php-cs-fixer-config/pull/887
[#888]: https://github.com/ergebnis/php-cs-fixer-config/pull/888
[#889]: https://github.com/ergebnis/php-cs-fixer-config/pull/889
[#891]: https://github.com/ergebnis/php-cs-fixer-config/pull/891
[#892]: https://github.com/ergebnis/php-cs-fixer-config/pull/892
[#893]: https://github.com/ergebnis/php-cs-fixer-config/pull/893
Expand Down
120 changes: 120 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,66 @@
<code>$value</code>
</PropertyTypeCoercion>
</file>
<file src="src/RuleSet/Php53.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php54.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php55.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php56.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php70.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php71.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php72.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php73.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php74.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php80.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php81.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/RuleSet/Php82.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="src/Rules.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[\array_merge(
Expand Down Expand Up @@ -54,6 +114,66 @@
<code>registerBuiltInFixers</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php53Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php54Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php55Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php56Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php70Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php71Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php72Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php73Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php74Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php80Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php81Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSet/Php82Test.php">
<InternalMethod>
<code>new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()</code>
</InternalMethod>
</file>
<file src="test/Unit/RuleSetTest.php">
<PossiblyUnusedMethod>
<code>provideValidHeader</code>
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php53.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;

final class Php53
{
Expand All @@ -30,14 +31,15 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::empty(),
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
$phpVersion->minor()->toInt(),
)),
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php54.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;

final class Php54
{
Expand All @@ -30,14 +31,15 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::empty(),
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
$phpVersion->minor()->toInt(),
)),
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php55.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;

final class Php55
{
Expand All @@ -30,14 +31,15 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::empty(),
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
$phpVersion->minor()->toInt(),
)),
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php56.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;

final class Php56
{
Expand All @@ -30,14 +31,15 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::empty(),
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
$phpVersion->minor()->toInt(),
)),
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php70.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;

final class Php70
{
Expand All @@ -30,14 +31,15 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::empty(),
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
$phpVersion->minor()->toInt(),
)),
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php71.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;

final class Php71
{
Expand All @@ -30,14 +31,15 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::empty(),
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
$phpVersion->minor()->toInt(),
)),
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php72.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;

final class Php72
{
Expand All @@ -30,14 +31,15 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::empty(),
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
$phpVersion->minor()->toInt(),
)),
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php73.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;

final class Php73
{
Expand All @@ -30,14 +31,15 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::empty(),
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
$phpVersion->minor()->toInt(),
)),
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;

final class Php74
{
Expand All @@ -30,14 +31,15 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::empty(),
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
$phpVersion->minor()->toInt(),
)),
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
Loading

0 comments on commit e9efb55

Please sign in to comment.