PHPackages                             interaction-design-foundation/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. interaction-design-foundation/coding-standard

ActivePhpcodesniffer-standard[Testing &amp; Quality](/categories/testing)

interaction-design-foundation/coding-standard
=============================================

IxDF coding standard: PHP\_CodeSniffer rules and shared PHP-CS-Fixer configuration.

0.7.0(2mo ago)7130.5k—6.9%1[2 issues](https://github.com/InteractionDesignFoundation/coding-standard/issues)[2 PRs](https://github.com/InteractionDesignFoundation/coding-standard/pulls)9MITPHPPHP ^8.3CI passing

Since Apr 14Pushed 1mo ago8 watchersCompare

[ Source](https://github.com/InteractionDesignFoundation/coding-standard)[ Packagist](https://packagist.org/packages/interaction-design-foundation/coding-standard)[ RSS](/packages/interaction-design-foundation-coding-standard/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (28)Used By (9)

[![Tests](https://github.com/InteractionDesignFoundation/coding-standard/actions/workflows/test.yml/badge.svg)](https://github.com/InteractionDesignFoundation/coding-standard/actions/workflows/test.yml)[![PHP Psalm](https://github.com/InteractionDesignFoundation/coding-standard/actions/workflows/psalm.yml/badge.svg)](https://github.com/InteractionDesignFoundation/coding-standard/actions/workflows/psalm.yml)[![PHP Psalm Level](https://camo.githubusercontent.com/72e97ab6e2b497d4b7dcce435b05be09769225dfff5a28146d8304addf30d65e/68747470733a2f2f73686570686572642e6465762f6769746875622f496e746572616374696f6e44657369676e466f756e646174696f6e2f636f64696e672d7374616e646172642f6c6576656c2e737667)](https://shepherd.dev/github/InteractionDesignFoundation/coding-standard)[![PHP Psalm Type Coverage](https://camo.githubusercontent.com/0d9f7d30a7d711a9d022fce1e62bb7c757bd12c790c0be181332647cc8b0d0aa/68747470733a2f2f73686570686572642e6465762f6769746875622f496e746572616374696f6e44657369676e466f756e646174696f6e2f636f64696e672d7374616e646172642f636f7665726167652e737667)](https://shepherd.dev/github/InteractionDesignFoundation/coding-standard)

IxDF Coding Standard
====================

[](#ixdf-coding-standard)

An opinionated coding standard for PHP/Laravel projects. Provides two independent tools — use either one or both together:

- **PHP\_CodeSniffer** — custom sniffs for strict types and Laravel conventions
- **PHP-CS-Fixer** — shared config with 80+ rules based on PER-CS 3.0

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

[](#installation)

```
composer require --dev interaction-design-foundation/coding-standard
```

PHP\_CodeSniffer
----------------

[](#php_codesniffer)

Create `phpcs.xml` in your project root:

```

    app
    config
    database
    routes
    tests

```

PHP-CS-Fixer
------------

[](#php-cs-fixer)

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

```
