PHPackages                             wayofdev/cs-fixer-config - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. wayofdev/cs-fixer-config

ActiveLibrary[Testing &amp; Quality](/categories/testing)

wayofdev/cs-fixer-config
========================

🧹 Adds custom rule-sets to PHP CS Fixer for consistent coding standards.

v1.5.3(1y ago)559.7k↓47.5%[1 issues](https://github.com/wayofdev/php-cs-fixer-config/issues)[11 PRs](https://github.com/wayofdev/php-cs-fixer-config/pulls)14MITPHPPHP ^8.1

Since Jul 15Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/wayofdev/php-cs-fixer-config)[ Packagist](https://packagist.org/packages/wayofdev/cs-fixer-config)[ Docs](https://wayof.dev)[ GitHub Sponsors](https://github.com/wayofdev)[ RSS](/packages/wayofdev-cs-fixer-config/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (111)Used By (14)

 [   ![WayOfDev Logo](https://raw.githubusercontent.com/wayofdev/.github/master/assets/logo.gh-light-mode-only.png)  ](https://wayof.dev)

 **Build**
 [![Build Status](https://camo.githubusercontent.com/51b3312556e2c1936c4bb9602d6cd34bd7340a9b7b42b6e40a57b47ea3a93038/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e742e7376673f75726c3d6874747073253341253246253246616374696f6e732d62616467652e6174726f782e6465762532467761796f666465762532467068702d63732d66697865722d636f6e6669672532466261646765267374796c653d666c61742d737175617265266c6162656c3d676974687562253230616374696f6e73)](https://github.com/wayofdev/php-cs-fixer-config/actions)

 **Project**
 [![Total Downloads](https://camo.githubusercontent.com/f7ead1337236944e70f98e3e61f46ef60b23b3d8b514f138f7c5315f39bb740a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7761796f666465762f63732d66697865722d636f6e6669673f267374796c653d666c61742d737175617265)](https://packagist.org/packages/wayofdev/cs-fixer-config) [![Latest Stable Version](https://camo.githubusercontent.com/67f30c7ba8a2c5f3515f6e5a3d162ff9206ba8b010584ba74d0a3279a4ca5dc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7761796f666465762f63732d66697865722d636f6e6669673f267374796c653d666c61742d737175617265)](https://packagist.org/packages/wayofdev/cs-fixer-config) [![Commits since latest release](https://camo.githubusercontent.com/4ba46bd02f65f6c3bf14c0dec31690f3836f496889aaec8a53432a7e315498f4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d6974732d73696e63652f7761796f666465762f7068702d63732d66697865722d636f6e6669672f6c61746573743f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wayofdev/cs-fixer-config) [![PHP Version Require](https://camo.githubusercontent.com/cb6be13f401a2c083b03d546d6eb89a6d5f21aa45f43b976db9692b947a8791d/68747470733a2f2f706f7365722e707567782e6f72672f7761796f666465762f63732d66697865722d636f6e6669672f726571756972652f7068703f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wayofdev/cs-fixer-config)

 **Quality**
 [![Codecov](https://camo.githubusercontent.com/7e8d979b4e8a1d736f6830b01c95fee6ab6aa5c48696e77901d972955b38f7cf/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7761796f666465762f7068702d63732d66697865722d636f6e6669673f7374796c653d666c61742d737175617265266c6f676f3d636f6465636f76)](https://app.codecov.io/gh/wayofdev/php-cs-fixer-config) [![Mutation testing badge](https://camo.githubusercontent.com/5eb8f94da7a4232608002fd38562b56fb3c3dd6da29cdc48718e4101c85c721a/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d737175617265266c6162656c3d6d75746174696f6e25323073636f72652675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532467761796f666465762532467068702d63732d66697865722d636f6e6669672532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/wayofdev/php-cs-fixer-config/master) ![PHP Stan Level 9 of 9](https://camo.githubusercontent.com/6172b4db74468f587dda17fb7ecf794448d11393fbb269b4b1935cfa9d98efaa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2532306c6576656c2d392532306f66253230392d627269676874677265656e3f7374796c653d666c61742d737175617265)

 **Community**
 [![Discord](https://camo.githubusercontent.com/34f37f68c2881c391251fb943c5110653c5e3d1076af732b7830211aff4f616b/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f313232383530363735383536323035383339313f7374796c653d666c61742d737175617265266c6f676f3d646973636f7264266c6162656c436f6c6f723d373238396439266c6f676f436f6c6f723d776869746526636f6c6f723d333934353664)](https://discord.gg/CE3TcCC5vr) [![Follow on Twitter (X)](https://camo.githubusercontent.com/91c1c3b545d03e0c79f91364259b2814308d2b3786c67c8578740879528ff37c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d466f6c6c6f772d626c61636b3f7374796c653d666c61742d737175617265266c6f676f3d58)](https://x.com/intent/follow?screen_name=wayofdev)

PHP CS Fixer Config
===================

[](#php-cs-fixer-config)

Wrapper with pre-defined rules around the [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) package — A tool to automatically fix PHP Coding Standards issues.

This repository aims to provide a standardized way to apply coding standards across multiple projects, ensuring consistency and adherence to best practices. By using predefined rulesets, it simplifies the setup process and allows teams to quickly integrate PHP-CS-Fixer into their development workflow.

If you **like/use** this package, please consider ⭐️ **starring** it. Thanks!

📜 Custom Rulesets
-----------------

[](#-custom-rulesets)

**`WayOfDev\PhpCsFixer\Config\RuleSets\DefaultRuleset::class`**

Based on **`@Symfony`** ruleset

- Used by [`@wayofdev`](https://github.com/wayofdev) organization

**`WayOfDev\PhpCsFixer\Config\RuleSets\ExtendedPERSet::class`**

Based on **`@PER-CS2.0`** ruleset

- Used by [`@buggregator`](https://github.com/buggregator) and [`@cycle`](http://github.com/cycle) organizations

💿 Installation
--------------

[](#-installation)

### → Using composer

[](#-using-composer)

Require as dependency:

```
composer req --dev wayofdev/cs-fixer-config
```

🛠 Configuration
---------------

[](#-configuration)

### → Setup

[](#-setup)

- Create PHP file and name it `.php-cs-fixer.dist.php` and place it inside root directory of project. It will be recognized by PHP CS Fixer automatically.
- Example contents of `.php-cs-fixer.dist.php` file:

    ```
