Skip to content

Commit

Permalink
Fix: Remove RuleSet\AbstractRuleSet
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Sep 17, 2023
1 parent c494350 commit 26063e7
Show file tree
Hide file tree
Showing 27 changed files with 71 additions and 156 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ For a full diff see [`5.15.1...main`][5.15.1...main].
- Removed `rules()` method from `Config\Ruleset\AbstractRuleSet` ([#868]), by [@localheinz]
- Removed `DOCTRINE_IGNORED_TAGS` constant from `Config\Ruleset\AbstractRuleSet` ([#875]), by [@localheinz]
- Removed constructor from `Config\Ruleset\AbstractRuleSet` ([#876]), by [@localheinz]
- Removed `Config\Ruleset\AbstractRuleSet` ([#877]), by [@localheinz]

## [`5.15.1`][5.15.1]

Expand Down Expand Up @@ -1176,6 +1177,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#874]: https://github.com/ergebnis/php-cs-fixer-config/pull/874
[#875]: https://github.com/ergebnis/php-cs-fixer-config/pull/875
[#876]: https://github.com/ergebnis/php-cs-fixer-config/pull/876
[#877]: https://github.com/ergebnis/php-cs-fixer-config/pull/877

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
96 changes: 0 additions & 96 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,105 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352">
<file src="src/RuleSet/AbstractRuleSet.php">
<PossiblyUnusedProperty>
<code>$rules</code>
</PossiblyUnusedProperty>
</file>
<file src="src/RuleSet/Php53.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php54.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php55.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php56.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php70.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php71.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php72.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php73.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php74.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php80.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php81.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php82.php">
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->rules]]></code>
</MixedArgumentTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/Rules.php">
<MixedArgumentTypeCoercion>
Expand Down
24 changes: 0 additions & 24 deletions src/RuleSet/AbstractRuleSet.php

This file was deleted.

5 changes: 3 additions & 2 deletions src/RuleSet/Php53.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php53 extends AbstractRuleSet implements ExplicitRuleSet
final class Php53 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php54.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php54 extends AbstractRuleSet implements ExplicitRuleSet
final class Php54 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php55.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php55 extends AbstractRuleSet implements ExplicitRuleSet
final class Php55 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php56.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php56 extends AbstractRuleSet implements ExplicitRuleSet
final class Php56 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php70.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php70 extends AbstractRuleSet implements ExplicitRuleSet
final class Php70 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php71.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php71 extends AbstractRuleSet implements ExplicitRuleSet
final class Php71 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php72.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php72 extends AbstractRuleSet implements ExplicitRuleSet
final class Php72 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php73.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php73 extends AbstractRuleSet implements ExplicitRuleSet
final class Php73 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php74 extends AbstractRuleSet implements ExplicitRuleSet
final class Php74 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php80 extends AbstractRuleSet implements ExplicitRuleSet
final class Php80 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php81.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php81 extends AbstractRuleSet implements ExplicitRuleSet
final class Php81 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
8 changes: 6 additions & 2 deletions src/RuleSet/Php82.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;

final class Php82 extends AbstractRuleSet implements ExplicitRuleSet
final class Php82 implements ExplicitRuleSet, RuleSet
{
protected array $rules = [
/**
* @var array<string, array<string, mixed>|bool>
*/
private array $rules = [
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
1 change: 0 additions & 1 deletion test/Unit/RuleSet/Php53Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Ergebnis\PhpCsFixer\Config\RuleSet;
use PHPUnit\Framework;

#[Framework\Attributes\CoversClass(RuleSet\AbstractRuleSet::class)]
#[Framework\Attributes\CoversClass(RuleSet\Php53::class)]
#[Framework\Attributes\UsesClass(Factory::class)]
#[Framework\Attributes\UsesClass(Name::class)]
Expand Down
1 change: 0 additions & 1 deletion test/Unit/RuleSet/Php54Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Ergebnis\PhpCsFixer\Config\RuleSet;
use PHPUnit\Framework;

#[Framework\Attributes\CoversClass(RuleSet\AbstractRuleSet::class)]
#[Framework\Attributes\CoversClass(RuleSet\Php54::class)]
#[Framework\Attributes\UsesClass(Factory::class)]
#[Framework\Attributes\UsesClass(Name::class)]
Expand Down
1 change: 0 additions & 1 deletion test/Unit/RuleSet/Php55Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Ergebnis\PhpCsFixer\Config\RuleSet;
use PHPUnit\Framework;

#[Framework\Attributes\CoversClass(RuleSet\AbstractRuleSet::class)]
#[Framework\Attributes\CoversClass(RuleSet\Php55::class)]
#[Framework\Attributes\UsesClass(Factory::class)]
#[Framework\Attributes\UsesClass(Name::class)]
Expand Down
1 change: 0 additions & 1 deletion test/Unit/RuleSet/Php56Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Ergebnis\PhpCsFixer\Config\RuleSet;
use PHPUnit\Framework;

#[Framework\Attributes\CoversClass(RuleSet\AbstractRuleSet::class)]
#[Framework\Attributes\CoversClass(RuleSet\Php56::class)]
#[Framework\Attributes\UsesClass(Factory::class)]
#[Framework\Attributes\UsesClass(Name::class)]
Expand Down
1 change: 0 additions & 1 deletion test/Unit/RuleSet/Php70Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Ergebnis\PhpCsFixer\Config\RuleSet;
use PHPUnit\Framework;

#[Framework\Attributes\CoversClass(RuleSet\AbstractRuleSet::class)]
#[Framework\Attributes\CoversClass(RuleSet\Php70::class)]
#[Framework\Attributes\UsesClass(Factory::class)]
#[Framework\Attributes\UsesClass(Name::class)]
Expand Down
1 change: 0 additions & 1 deletion test/Unit/RuleSet/Php71Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Ergebnis\PhpCsFixer\Config\RuleSet;
use PHPUnit\Framework;

#[Framework\Attributes\CoversClass(RuleSet\AbstractRuleSet::class)]
#[Framework\Attributes\CoversClass(RuleSet\Php71::class)]
#[Framework\Attributes\UsesClass(Factory::class)]
#[Framework\Attributes\UsesClass(Name::class)]
Expand Down
Loading

0 comments on commit 26063e7

Please sign in to comment.