Skip to content

Commit 130af89

Browse files
committed
move set link to SetList
1 parent 97661ab commit 130af89

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎src/Configuration/RectorConfigBuilder.php‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,6 @@ final class RectorConfigBuilder
166166

167167
private ?string $editorUrl = null;
168168

169-
/**
170-
* All PHP version rules in one set; each rule gates itself by PHP version at runtime
171-
*/
172-
private const string PHP_VERSION_BASED_SET = __DIR__ . '/../../config/set/php-version-based.php';
173-
174169
private ?bool $isWithPhpSetsUsed = null;
175170

176171
private ?bool $isWithPhpLevelUsed = null;
@@ -970,7 +965,7 @@ public function withPhpLevel(int $level): self
970965

971966
$setRectorsResolver = new SetRectorsResolver();
972967
$rectorRulesWithConfiguration = $setRectorsResolver->resolveFromFilePathIncludingConfiguration(
973-
self::PHP_VERSION_BASED_SET
968+
SetList::PHP_VERSION_BASED_SET
974969
);
975970

976971
foreach ($rectorRulesWithConfiguration as $position => $rectorRuleWithConfiguration) {
@@ -1145,7 +1140,7 @@ private function addPhpLevelSets(): self
11451140
{
11461141
$this->isWithPhpSetsUsed = true;
11471142

1148-
$this->sets[] = self::PHP_VERSION_BASED_SET;
1143+
$this->sets[] = SetList::PHP_VERSION_BASED_SET;
11491144

11501145
return $this;
11511146
}

‎src/Set/ValueObject/SetList.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,9 @@ final class SetList
138138
public const string CARBON = __DIR__ . '/../../../config/set/datetime-to-carbon.php';
139139

140140
public const string BEHAT_ANNOTATIONS_TO_ATTRIBUTES = __DIR__ . '/../../../config/set/behat-annotations-to-attributes.php';
141+
142+
/**
143+
* All PHP version rules in one set; each rule gates itself by PHP version at runtime
144+
*/
145+
public const string PHP_VERSION_BASED_SET = __DIR__ . '/../../config/set/php-version-based.php';
141146
}

0 commit comments

Comments
 (0)