Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Synchronize with ergebnis/php-cs-fixer-config-template #294

Merged
merged 1 commit into from
Dec 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions test/Unit/RuleSet/AbstractRuleSetTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ final public function testRuleSetDoesNotConfigureRuleSets(): void
));
}

final public function testRuleSetDoesDoNotConfigureRulesThatAreNotBuiltIn(): void
final public function testRuleSetDoesNotConfigureRulesThatAreNotBuiltIn(): void
{
$namesOfRulesThatAreConfiguredAndNotBuiltIn = \array_diff(
self::namesOfRulesThatAreConfigured(),
Expand All @@ -80,7 +80,7 @@ final public function testRuleSetDoesDoNotConfigureRulesThatAreNotBuiltIn(): voi
final public function testRuleSetDoesNotConfigureRulesThatAreDeprecated(): void
{
$namesOfRulesThatAreConfiguredAndDeprecated = \array_intersect(
self::namesOfRulesThatAreDeprecated(),
self::namesOfRulesThatAreBuiltInAndDeprecated(),
self::namesOfRulesThatAreConfigured()
);

Expand All @@ -94,7 +94,7 @@ final public function testRuleSetDoesNotConfigureRulesThatAreDeprecated(): void
final public function testRuleSetConfiguresAllRulesThatAreNotDeprecated(): void
{
$namesOfRulesThatAreNotDeprecatedAndNotConfigured = \array_diff(
self::namesOfRulesThatAreNotDeprecated(),
self::namesOfRulesThatAreBuiltInAndNotDeprecated(),
self::namesOfRulesThatAreConfigured()
);

Expand Down Expand Up @@ -279,12 +279,12 @@ private static function namesOfRulesThatAreConfigured(): array

$ruleSet = new RuleSet\RuleSet($rules);

/** @var array<string, Fixer\FixerInterface> $fixersThatAreConfigured */
$fixersThatAreConfigured = $ruleSet->getRules();
/** @var array<string, bool> $rulesThatAreConfigured */
$rulesThatAreConfigured = $ruleSet->getRules();

\ksort($fixersThatAreConfigured);
\ksort($rulesThatAreConfigured);

return \array_keys($fixersThatAreConfigured);
return \array_keys($rulesThatAreConfigured);
}

/**
Expand All @@ -298,7 +298,7 @@ private static function namesOfRulesThatAreBuiltIn(): array
/**
* @return array<int, string>
*/
private static function namesOfRulesThatAreDeprecated(): array
private static function namesOfRulesThatAreBuiltInAndDeprecated(): array
{
return \array_keys(\array_filter(self::fixersThatAreBuiltIn(), static function (Fixer\FixerInterface $fixer): bool {
return $fixer instanceof Fixer\DeprecatedFixerInterface;
Expand All @@ -308,7 +308,7 @@ private static function namesOfRulesThatAreDeprecated(): array
/**
* @return array<int, string>
*/
private static function namesOfRulesThatAreNotDeprecated(): array
private static function namesOfRulesThatAreBuiltInAndNotDeprecated(): array
{
return \array_keys(\array_filter(self::fixersThatAreBuiltIn(), static function (Fixer\FixerInterface $fixer): bool {
return !$fixer instanceof Fixer\DeprecatedFixerInterface;
Expand Down