mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 1764c19455ce55ee49ec1d678d422c788e7c4fff
1764c19455
[Configuration] Do not sets, skip, rules on empty array on RectorConfigBuilder (#5731)
This commit is contained in:
parent
2bf9bab235
commit
b50605a40a
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = 'a94605a3c00447f1f3348b66d0719652cb2aa8ce';
|
public const PACKAGE_VERSION = '1764c19455ce55ee49ec1d678d422c788e7c4fff';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2024-03-17 00:26:35';
|
public const RELEASE_DATE = '2024-03-17 08:37:44';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -160,7 +160,9 @@ final class RectorConfigBuilder
|
||||||
if (\in_array(SetList::DEAD_CODE, $uniqueSets, \true) && $this->isDeadCodeLevelUsed) {
|
if (\in_array(SetList::DEAD_CODE, $uniqueSets, \true) && $this->isDeadCodeLevelUsed) {
|
||||||
throw new InvalidConfigurationException(\sprintf('Your config already enables dead code set.%sRemove "->withDeadCodeLevel()" as it only duplicates it, or remove dead code set.', \PHP_EOL));
|
throw new InvalidConfigurationException(\sprintf('Your config already enables dead code set.%sRemove "->withDeadCodeLevel()" as it only duplicates it, or remove dead code set.', \PHP_EOL));
|
||||||
}
|
}
|
||||||
$rectorConfig->sets($uniqueSets);
|
if ($uniqueSets !== []) {
|
||||||
|
$rectorConfig->sets($uniqueSets);
|
||||||
|
}
|
||||||
if ($this->paths !== []) {
|
if ($this->paths !== []) {
|
||||||
$rectorConfig->paths($this->paths);
|
$rectorConfig->paths($this->paths);
|
||||||
}
|
}
|
||||||
|
@ -174,8 +176,12 @@ final class RectorConfigBuilder
|
||||||
$rectorConfig->tag($registerService->getClassName(), $registerService->getTag());
|
$rectorConfig->tag($registerService->getClassName(), $registerService->getTag());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rectorConfig->skip($this->skip);
|
if ($this->skip !== []) {
|
||||||
$rectorConfig->rules($this->rules);
|
$rectorConfig->skip($this->skip);
|
||||||
|
}
|
||||||
|
if ($this->rules !== []) {
|
||||||
|
$rectorConfig->rules($this->rules);
|
||||||
|
}
|
||||||
foreach ($this->rulesWithConfigurations as $rectorClass => $configurations) {
|
foreach ($this->rulesWithConfigurations as $rectorClass => $configurations) {
|
||||||
foreach ($configurations as $configuration) {
|
foreach ($configurations as $configuration) {
|
||||||
$rectorConfig->ruleWithConfiguration($rectorClass, $configuration);
|
$rectorConfig->ruleWithConfiguration($rectorClass, $configuration);
|
||||||
|
|
Loading…
Reference in New Issue