PHPackages                             craftcms/ecs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. craftcms/ecs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

craftcms/ecs
============

Easy Coding Standard configurations for Craft CMS projects

18317.7k↓18.3%5[4 issues](https://github.com/craftcms/ecs/issues)[3 PRs](https://github.com/craftcms/ecs/pulls)20PHP

Since Jun 28Pushed 1y ago2 watchersCompare

[ Source](https://github.com/craftcms/ecs)[ Packagist](https://packagist.org/packages/craftcms/ecs)[ RSS](/packages/craftcms-ecs/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (20)

Easy Coding Standard config for Craft CMS
=========================================

[](#easy-coding-standard-config-for-craft-cms)

This package provides [Easy Coding Standard](https://github.com/symplify/easy-coding-standard) configurations for Craft CMS plugins and projects.

In general, we follow the [PSR-12](https://www.php-fig.org/psr/psr-12/) coding style guide, with a couple alterations:

- Multi-line function argument rules aren’t enforced. ([¶4.4](https://www.php-fig.org/psr/psr-12/#44-methods-and-functions))
- Spaces after the `function` keyword aren’t enforced. ([¶7](https://www.php-fig.org/psr/psr-12/#7-closures))
- Visibility is not enforced for constants, for Craft 3 projects.

To install, run the following commands within your plugin or project:

```
composer config minimum-stability dev
```

```
composer config prefer-stable true
```

```
composer require craftcms/ecs:dev-main --dev
```

Then add an `ecs.php` file to the root of your plugin or project:

```
