Use Prepared Sets
mainPrepared sets bundle curated rules to save time. You can enable the entire common set or specific topics using withPreparedSets().
Available topics:
arrays: array syntax, spacing, trailing commas, indentationspaces: whitespace, operator/type spacing, blank linesnamespaces: imports ordering, unused/needless-alias importsdocblocks: phpdoc tags, types, alignment, cleanupcontrolStructures: control flow, casing, operators, class structurecomments: comment style, spacing, empty-comment cleanupcasing: native function/type, magic method, literal casingcleanup: dead statements, useless returns/casts, unused closure imports
To enable everything at once, use ->withPreparedSets(common: true).
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure()
->withPaths([__DIR__ . '/src', __DIR__ . '/tests'])
->withPreparedSets(
arrays: true,
spaces: true,
namespaces: true,
docblocks: true,
controlStructures: true,
comments: true,
casing: true,
cleanup: true,
);