Skip to content

RectorConfig

github-actions edited this page Apr 26, 2026 · 1 revision

Provides the default Rector configuration.

Consumers can use this as a starting point and extend it:

return \FastForward\DevTools\Config\RectorConfig::configure( static function (\Rector\Config\RectorConfig $rectorConfig): void { $rectorConfig->rules([ // custom rules ]); } );


  • Full name: \FastForward\DevTools\Config\RectorConfig
  • This class is marked as final and can't be subclassed
  • This class is a Final class

See Also:

Constants

Constant Visibility Type Value
DEFAULT_SETS public list [\Rector\Set\ValueObject\SetList::DEAD_CODE, \Rector\Set\ValueObject\SetList::CODE_QUALITY, \Rector\Set\ValueObject\SetList::CODING_STYLE, \Rector\Set\ValueObject\SetList::TYPE_DECLARATION, \Rector\Set\ValueObject\SetList::PRIVATIZATION, \Rector\Set\ValueObject\SetList::INSTANCEOF, \Rector\Set\ValueObject\SetList::EARLY_RETURN]
DEFAULT_RULES public list [\Ergebnis\Rector\Rules\Faker\GeneratorPropertyFetchToMethodCallRector::class, \FastForward\DevTools\Rector\AddMissingMethodPhpDocRector::class, \FastForward\DevTools\Rector\RemoveEmptyDocBlockRector::class]
DEFAULT_SKIPPED_RULES public list [\Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector::class, \Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector::class]

Methods

configure

Creates the default Rector configuration.

public static configure(callable|null $customize = null): callable
  • This method is static. Parameters:
Parameter Type Description
$customize callable|null optional callback to customize the configuration

Return Value:

the configuration callback


applySafeMigrationSet

Applies the optional Safe migration callback when the package is installed.

public static applySafeMigrationSet(\Rector\Config\RectorConfig $rectorConfig): void
  • This method is static. Parameters:
Parameter Type Description
$rectorConfig \Rector\Config\RectorConfig

Clone this wiki locally