How to use rector with formatted code defined by PHP Code Sniffer 3 configuration file #8421
-
Is it possible to make changes by rector using some coding standard eg PSR2 supplied by PHP Code Sniffer 3 configuration file? |
Beta Was this translation helpful? Give feedback.
Answered by
TomasVotruba
Jan 21, 2024
Replies: 1 comment
-
Hi, the AST printer is independent on coding standard. For custom coding standard, it's better to use your favorite CS tool. We use ECS as easy to setup and use: # ecs.php
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure()
->withPaths([
__DIR__ . '/src',
])
->withPreparedSets(psr12: true); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
interduo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, the AST printer is independent on coding standard. For custom coding standard, it's better to use your favorite CS tool.
We use ECS as easy to setup and use: