Skip to content

Commit

Permalink
Merge pull request #868 from ergebnis/fix/rules
Browse files Browse the repository at this point in the history
Fix: Remove `rules()` method from `AbstractRuleSet`
  • Loading branch information
localheinz committed Sep 15, 2023
2 parents 4326f24 + 27cb11f commit 5ffaabf
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@ For a full diff see [`5.15.1...main`][5.15.1...main].
- Removed `$name` field from `Config\Ruleset\AbstractRuleSet` ([#865]), by [@localheinz]
- Removed `$targetPhpVersion` field and `targetPhpVersion()` method from `Config\Ruleset\AbstractRuleSet` ([#866]), by [@localheinz]
- Removed `name()` method from `Config\Ruleset\AbstractRuleSet` ([#867]), by [@localheinz]
- Removed `rules()` method from `Config\Ruleset\AbstractRuleSet` ([#868]), by [@localheinz]

## [`5.15.1`][5.15.1]

Expand Down Expand Up @@ -1156,6 +1157,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#864]: https://github.com/ergebnis/php-cs-fixer-config/pull/864
[#866]: https://github.com/ergebnis/php-cs-fixer-config/pull/866
[#867]: https://github.com/ergebnis/php-cs-fixer-config/pull/867
[#868]: https://github.com/ergebnis/php-cs-fixer-config/pull/868

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
48 changes: 48 additions & 0 deletions psalm-baseline.xml
Expand Up @@ -6,61 +6,109 @@
</PossiblyUnusedMethod>
</file>
<file src="src/RuleSet/Php53.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php54.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php55.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php56.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php70.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php71.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php72.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php73.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php74.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php80.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php81.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/RuleSet/Php82.php">
<MixedReturnTypeCoercion>
<code><![CDATA[$this->rules]]></code>
<code>array</code>
</MixedReturnTypeCoercion>
<NonInvariantDocblockPropertyType>
<code>$rules</code>
</NonInvariantDocblockPropertyType>
Expand Down
5 changes: 0 additions & 5 deletions src/RuleSet/AbstractRuleSet.php
Expand Up @@ -135,9 +135,4 @@ final public function __construct(?string $header = null)
'separate' => 'both',
];
}

final public function rules(): array
{
return $this->rules;
}
}
5 changes: 5 additions & 0 deletions src/RuleSet/Php53.php
Expand Up @@ -815,6 +815,11 @@ public function name(): string
return 'ergebnis (PHP 5.3)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 50300;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php54.php
Expand Up @@ -817,6 +817,11 @@ public function name(): string
return 'ergebnis (PHP 5.4)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 50400;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php55.php
Expand Up @@ -826,6 +826,11 @@ public function name(): string
return 'ergebnis (PHP 5.5)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 50500;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php56.php
Expand Up @@ -826,6 +826,11 @@ public function name(): string
return 'ergebnis (PHP 5.6)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 50600;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php70.php
Expand Up @@ -826,6 +826,11 @@ public function name(): string
return 'ergebnis (PHP 7.0)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 70000;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php71.php
Expand Up @@ -829,6 +829,11 @@ public function name(): string
return 'ergebnis (PHP 7.1)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 70100;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php72.php
Expand Up @@ -829,6 +829,11 @@ public function name(): string
return 'ergebnis (PHP 7.2)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 70200;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php73.php
Expand Up @@ -830,6 +830,11 @@ public function name(): string
return 'ergebnis (PHP 7.3)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 70300;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php74.php
Expand Up @@ -833,6 +833,11 @@ public function name(): string
return 'ergebnis (PHP 7.4)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 70400;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php80.php
Expand Up @@ -842,6 +842,11 @@ public function name(): string
return 'ergebnis (PHP 8.0)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 80000;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php81.php
Expand Up @@ -844,6 +844,11 @@ public function name(): string
return 'ergebnis (PHP 8.1)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 80100;
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php82.php
Expand Up @@ -844,6 +844,11 @@ public function name(): string
return 'ergebnis (PHP 8.2)';
}

public function rules(): array
{
return $this->rules;
}

public function targetPhpVersion(): int
{
return 80200;
Expand Down

0 comments on commit 5ffaabf

Please sign in to comment.