6,598 open-source and SaaS tools, with GitHub stats refreshed every day.

Easy Coding Standard

Open source

Easy Coding Standard runs PHP-CS-Fixer and PHP CodeSniffer together in one parallel command configured through a single PHP file.

tomasvotruba.com
Easy Coding Standard homepage screenshot
GitHub stars
1.6k
Last commit
today
Repository age
9 years
Version
13.3.2
Licence
MIT
Self-hosted
Yes

About Easy Coding Standard

Easy Coding Standard, or ECS, is a PHP tool that checks and fixes code style. It combines the rules of PHP CodeSniffer and PHP-CS-Fixer into a single command, so a project can enforce a consistent coding standard without maintaining two separate configurations or toolchains.

Configuration lives in one PHP file, ecs.php, which ECS creates on first run with your directories and a starter rule. From there you can add prepared rule sets covering arrays, spaces, namespaces, docblocks, control structures, comments, casing and cleanup, or use standalone presets such as PSR-12, PER-CS and a clean-code set. Running it shows suggested diffs, and adding a fix flag applies them. Runs are parallel by default, which keeps checks fast.

ECS installs on any PHP project from version 7.2 to 8.5 regardless of the project's own dependencies, because it bundles what it needs. It is written in PHP and released under the MIT licence. This repository is the deployed package, with development happening in a separate source repository. It suits PHP teams that want style checks in local workflows and CI.

Key features

  • Runs PHP CodeSniffer and PHP-CS-Fixer rules together
  • Parallel execution out of the box
  • Single ecs.php configuration file
  • Prepared rule sets for common topics
  • PSR-12 and PER-CS presets
  • Works on PHP 7.2 through 8.5

Good fit for

  • →Enforcing code style in CI pipelines
  • →Auto-fixing legacy PHP codebases
  • →Consolidating two code style tools into one
Built with
PHP
Tags
php
coding-standard
code-style
linter
php-cs-fixer
codesniffer
ci
psr-12
parallel

Open-source alternatives to Easy Coding Standard

See all

SaaS alternatives to Easy Coding Standard

See all