Skip to content

Commit

Permalink
Merge pull request #889 from ergebnis/feature/erickskrauch
Browse files Browse the repository at this point in the history
Enhancement: Require and use `erickskrauch/php-cs-fixer-custom-fixers`
  • Loading branch information
localheinz committed Sep 19, 2023
2 parents 3640845 + e9efb55 commit b4899e4
Show file tree
Hide file tree
Showing 28 changed files with 261 additions and 25 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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"require": {
"php": "~8.1.0 || ~8.2.0",
"ext-filter": "*",
"erickskrauch/php-cs-fixer-custom-fixers": "~1.2.0",
"friendsofphp/php-cs-fixer": "~3.27.0"
},
"require-dev": {
Expand Down
64 changes: 63 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
Loading

0 comments on commit b4899e4

Please sign in to comment.