Easy Coding Standard configurations for Craft CMS projects
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 5
pkg:composer/putyourlightson/ecs
Requires
- php: ^7.2.5|^8.0.2
- craftcms/ecs: dev-main
- symplify/easy-coding-standard: ^10.0
This package is auto-updated.
Last update: 2025-09-24 23:26:03 UTC
README
Forked from https://github.com/craftcms/ecs with a few modifications:
- Runs with
parallel
mode enabled. - Sets the control structure continuation keyword to be on the next line.
// Before: if ($condition) { // Do things } else { // Do other things } // After: if ($condition) { // Do things } else { // Do other things }
To install, run the following command within your plugin or project:
composer require putyourlightson/ecs:dev-main --dev
Then add an ecs.php
file to the root of your plugin or project:
<?php declare(strict_types=1); use putyourlightson\ecs\SetList; use Symplify\EasyCodingStandard\Config\ECSConfig; return static function(ECSConfig $ecsConfig): void { $ecsConfig->paths([ __DIR__ . '/src', __FILE__, ]); $ecsConfig->sets([SetList::CRAFT_CMS_3]); // for Craft 3 projects $ecsConfig->sets([SetList::CRAFT_CMS_4]); // for Craft 4 projects };
Created by PutYourLightsOn.