PHPackages                             brick/coding-standard - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. brick/coding-standard

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

brick/coding-standard
=====================

Coding standard tools and configurations used in Brick organization.

v4(4mo ago)21.0k↓100%3MITPHPPHP &gt;=8.2CI passing

Since Aug 31Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/brick/coding-standard)[ Packagist](https://packagist.org/packages/brick/coding-standard)[ GitHub Sponsors](https://github.com/BenMorel)[ RSS](/packages/brick-coding-standard/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Brick Coding Standard
=====================

[](#brick-coding-standard)

[![](https://raw.githubusercontent.com/brick/brick/master/logo.png)](https://raw.githubusercontent.com/brick/brick/master/logo.png)

Coding standard for Brick libraries.

[![Build Status](https://github.com/brick/coding-standard/workflows/Test/badge.svg)](https://github.com/brick/coding-standard/actions)[![Latest Stable Version](https://camo.githubusercontent.com/0c1e0946fe02176f211cac3e1e4aabc1f4c2bb9b3fb94c2ace455cc0d118f807/68747470733a2f2f706f7365722e707567782e6f72672f627269636b2f636f64696e672d7374616e646172642f762f737461626c65)](https://packagist.org/packages/brick/coding-standard)[![Total Downloads](https://camo.githubusercontent.com/2571b6912f50a89818b4117e740cfbca81bd8afe7e19275dd786849ab70c9654/68747470733a2f2f706f7365722e707567782e6f72672f627269636b2f636f64696e672d7374616e646172642f646f776e6c6f616473)](https://packagist.org/packages/brick/coding-standard)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](http://opensource.org/licenses/MIT)

Overview
--------

[](#overview)

This coding standard is used in Brick libraries, but can also be used in your own projects.

It is based on [PSR-12](https://www.php-fig.org/psr/psr-12/) and uses [Easy Coding Standard](https://github.com/easy-coding-standard/easy-coding-standard) with rules cherry-picked from [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer), [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer), and the [Slevomat coding standard](https://github.com/slevomat/coding-standard).

Release process
---------------

[](#release-process)

This project is released with sequential version numbers: `v1`, `v2`, etc.

Each new version should be considered as breaking, as it may update dependency versions, add new rules, or modify existing ones.

Usage
-----

[](#usage)

### Use locally

[](#use-locally)

To use `brick/coding-standard` locally, install it with Composer:

```
composer require --dev brick/coding-standard
```

Then create an `ecs.php` file in the root of your project with the following content:

```
