RectorConfig

Class
Final: Yes

Provides the default Rector configuration.

Description

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 ]); } );

Tags

Table of Contents

Constants

 = [\Ergebnis\Rector\Rules\Faker\GeneratorPropertyFetchToMethodCallRector::class, \FastForward\DevTools\Rector\AddMissingMethodPhpDocRector::class, \FastForward\DevTools\Rector\RemoveEmptyDocBlockRector::class]
 = [\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]
 = [\Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector::class, \Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector::class]

Methods

applySafeMigrationSet()

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

 : void
configure()

Creates the default Rector configuration.

 : callable
Constants

Constants

DEFAULT_RULES

Public
public array<int, class-string> DEFAULT_RULES = [\Ergebnis\Rector\Rules\Faker\GeneratorPropertyFetchToMethodCallRector::class, \FastForward\DevTools\Rector\AddMissingMethodPhpDocRector::class, \FastForward\DevTools\Rector\RemoveEmptyDocBlockRector::class]

Description

the default Rector rules applied on top of the configured sets

DEFAULT_SETS

Public
public array<int, string> DEFAULT_SETS = [\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]

Description

the default Rector sets applied to Fast Forward projects

DEFAULT_SKIPPED_RULES

Public
public array<int, class-string> DEFAULT_SKIPPED_RULES = [\Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector::class, \Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector::class]

Description

the Rector rules that SHOULD be skipped by default

Methods

applySafeMigrationSet()

Public Static

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

public static applySafeMigrationSet(RectorConfig  $rectorConfig) : void
Parameters
$rectorConfig : RectorConfig

configure()

Public Static

Creates the default Rector configuration.

public static configure([ callable|null  $customize = null]) : callable
Parameters
$customize : callable|null = null

Description

optional callback to customize the configuration

Return values
callable

Description

the configuration callback