Rector how to avoid formatting source code?

Viewed 384

When running a simple Rector rule NormalizeNamespaceByPSR4ComposerAutoloadFileSystemRector the source code will be completely formatted, line breaks and spaces that are used to beautify the source code are removed. How can this be avoided in Rector?

$services->set(NormalizeNamespaceByPSR4ComposerAutoloadFileSystemRector::class);

... is the only service config in rector.php.

Rector says "! [NOTE] File ..." will be added:" So according to the rule it creates a new file (actually it is the same file...). I susspect this looks new for Rector because of the added namespace by the rule.

0 Answers
Related