PHPackages                             phlak/coding-standards - 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. phlak/coding-standards

ActiveLibrary

phlak/coding-standards
======================

A pre-defined set of coding standards for PHP CS Fixer.

5.0.0(2mo ago)254.7k↓42.9%[1 PRs](https://github.com/PHLAK/CodingStandards/pulls)15MITPHPPHP ^8.2CI passing

Since Aug 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/PHLAK/CodingStandards)[ Packagist](https://packagist.org/packages/phlak/coding-standards)[ GitHub Sponsors](https://github.com/sponsors/PHLAK)[ Fund](https://paypal.me/ChrisKankiewicz)[ RSS](/packages/phlak-coding-standards/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (8)Versions (26)Used By (15)

PHLAK's Coding Standards
========================

[](#phlaks-coding-standards)

 [![Join our Community](https://camo.githubusercontent.com/073a08ec4c3c801a8e24c53184d95a6562d74582854cb46320bcd76ef48ea543/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a6f696e5f7468652d436f6d6d756e6974792d3762313666662e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/PHLAK/CodingStandards/discussions) [![Become a Sponsor](https://camo.githubusercontent.com/00da07edf5fbff7528a4743d85563603f9284f02680e0ab1e73652e680878548/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4265636f6d655f612d53706f6e736f722d6363343139352e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/users/PHLAK/sponsorship) [![One-time Donation](https://camo.githubusercontent.com/e9b5aa71ffdb17943c10c6d6b4a3132b66a938495331e488ecbdad1f3c078879/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d616b655f612d446f6e6174696f6e2d3030366262362e7376673f7374796c653d666f722d7468652d6261646765)](https://paypal.me/ChrisKankiewicz)
 [![Latest Stable Version](https://camo.githubusercontent.com/0d4b8ba11c199e7678c8201f3dcc55ac7d9f2928b583a2156419176447283504/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70686c616b2f636f64696e672d7374616e64617264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phlak/coding-standards) [![Total Downloads](https://camo.githubusercontent.com/bb2cd181de8c8b7d21088d067dacd387f5f5106635023031d1570657840bdc45/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70686c616b2f636f64696e672d7374616e64617264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phlak/coding-standards) [![License](https://camo.githubusercontent.com/606e0f96755e7bbd314a1acd1ca7c4fb1f69eefcffe15e8e155179ca54576bf6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70686c616b2f636f64696e672d7374616e64617264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phlak/coding-standards) [![Test Suite](https://camo.githubusercontent.com/9f88fbf7eb0a12d4af4fed6a2419a12075bf54c91a7b960c4a4877848a41cb01/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f50484c414b2f436f64696e675374616e64617264732f746573742d73756974652e79616d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/PHLAK/CodingStandards/actions)

 A pre-defined set of coding standards for PHP CS Fixer
 Created by [Chris Kankiewicz](https://www.ChrisKankiewicz.com) ([@phlak.dev](https://bsky.app/profile/phlak.dev))

---

Requirements
------------

[](#requirements)

- PHP

Installation
------------

[](#installation)

```
composer require --dev phlak/coding-standards

```

Usage
-----

[](#usage)

After installation you may initialze the coding standards configuration with the provided `cs` executable.

```
composer exec cs init

```

Alternatively you may manually create a `.php-cs-fxer.dist.php` file in the root folder with the following contents.

```
