PHPackages                             iwf-web/php-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. [Testing &amp; Quality](/categories/testing)
4. /
5. iwf-web/php-coding-standard

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

iwf-web/php-coding-standard
===========================

Configs &amp; RuleSets for PHP Code

1.1.1(1w ago)02.0k↓48.7%2MITPHPPHP &gt;=7.4CI passing

Since Dec 19Pushed 1w agoCompare

[ Source](https://github.com/iwf-web/php-coding-standard)[ Packagist](https://packagist.org/packages/iwf-web/php-coding-standard)[ Docs](https://github.com/iwf-web/php-coding-standard)[ Fund](https://www.buymeacoffee.com/d3strukt0r)[ GitHub Sponsors](https://github.com/D3strukt0r)[ RSS](/packages/iwf-web-php-coding-standard/feed)WikiDiscussions main Synced yesterday

READMEChangelog (6)Dependencies (3)Versions (10)Used By (2)

IWF Web PHP Coding Standard
===========================

[](#iwf-web-php-coding-standard)

Custom PHP-CS-Fixer rule sets for consistent code style across IWF Web projects.

[![License](https://camo.githubusercontent.com/a6d04c71770b1d7e55e6fc6f550823d8b1785465d2816496c92dd00400fb1048/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6977662d7765622f7068702d636f64696e672d7374616e64617264)](https://github.com/iwf-web/php-coding-standard/blob/main/LICENSE.txt)[![Version](https://camo.githubusercontent.com/baa2ff6eee564761d97999be1f5a2b8b2e86610c991162e4b21e4a69087c180e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6977662d7765622f7068702d636f64696e672d7374616e646172643f6c6162656c3d6c617465737425323072656c65617365)](https://packagist.org/packages/iwf-web/php-coding-standard)[![Version (including pre-releases)](https://camo.githubusercontent.com/adce4ee41bffd395c7c6c6117d076fcaa682d556f877b4d1504198b3e8cf3c21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6977662d7765622f7068702d636f64696e672d7374616e646172643f696e636c7564655f70726572656c6561736573266c6162656c3d6c61746573742532307072652d72656c65617365)](https://packagist.org/packages/iwf-web/php-coding-standard)[![Downloads on Packagist](https://camo.githubusercontent.com/a6fca7e3cef5fa6e81ee9160190de133f3a0027b92bade1191edbfe4eba32fb8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6977662d7765622f7068702d636f64696e672d7374616e64617264)](https://packagist.org/packages/iwf-web/php-coding-standard)

Rule Sets
---------

[](#rule-sets)

This package provides two rule sets:

Rule SetDescription`@IWFWeb/standard`Non-risky coding style rules for consistent formatting`@IWFWeb/standard:risky`Risky rules that may change code behavior (use with caution)Both rule sets build upon the excellent `@PhpCsFixer` rule set (which includes `@Symfony` and `@PSR12`) with customizations tailored for IWF Web projects.

Getting Started
---------------

[](#getting-started)

### Prerequisites

[](#prerequisites)

- PHP 8.2 or higher
- [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) ^3.88 — the `Config::registerCustomRuleSets()` method used below was added in 3.88; earlier versions cannot load these rule sets

### Installation

[](#installation)

```
composer require --dev iwf-web/php-coding-standard
```

### Usage

[](#usage)

Create a `.php-cs-fixer.dist.php` file in your project root:

```
