Download the PHP package interaction-design-foundation/coding-standard without Composer
On this page you can find all versions of the php package interaction-design-foundation/coding-standard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download interaction-design-foundation/coding-standard
More information about interaction-design-foundation/coding-standard
Files in interaction-design-foundation/coding-standard
Download interaction-design-foundation/coding-standard
More information about interaction-design-foundation/coding-standard
Files in interaction-design-foundation/coding-standard
Vendor interaction-design-foundation
Package coding-standard
Short Description IxDF coding standard: PHP_CodeSniffer rules and shared PHP-CS-Fixer configuration.
License MIT
Package coding-standard
Short Description IxDF coding standard: PHP_CodeSniffer rules and shared PHP-CS-Fixer configuration.
License MIT
Please rate this library. Is it a good library?
Informations about the package coding-standard
## IxDF PHP Coding Standard
An opinionated coding standard for PHP and Laravel projects, built on [PER-CS3.0](https://www.php-fig.org/per/coding-style/).
Focuses on:
- **High signal-to-noise ratio** (concise but informative PHPDoc, e.g. array shapes)
- **Strict, explicit code**: `strict_types`, strict comparisons, final by default, no magic
- **Harmony with static analysis tools** (PHPStan, Psalm, Rector, etc.)
- **Auto-fixing over reporting** (violations are not only reported but also fixed automatically, when possible)
- **PHP and Laravel best practices** (enforced, not just suggested)
Two tools, two roles, meant to run together:
- **PHP-CS-Fixer** (primary): fast auto-formatting and modernization rules.
- **PHP_CodeSniffer** (supplementary): structural and semantic checks PHP-CS-Fixer cannot express (complexity, Laravel conventions, naming).
> [!TIP]
> This repository is a part of the IxDF toolchain for PHP: Rector ➝ Coding Standard Fixers ➝ PHPStan + Psalm.
## 1. Installation
## 2. Configuration
### PHP-CS-Fixer
Primary formatter.
Create `.php-cs-fixer.php` in your project root:
Run it:
### PHP_CodeSniffer
Supplementary (optional) formatter.
Create `phpcs.xml` in your project root:
On top of the Generic, PSR and [Slevomat](https://github.com/slevomat/coding-standard) rulesets, `IxDFCodingStandard` ships its own sniffs.
Some run by default; some are opt-in. See [docs/README.md](docs/README.md) for the full list and configuration.
Run it:
### Composer scripts (recommended)
Wire both tools into `composer.json` so the whole team runs them the same way:
`cs` fixes files in place. Edit `composer.json`:
## 3. Continuous integration
Run the fixer in CI and commit the result back, so the branch is always formatted without blocking the build.
This repository dogfoods that pattern; copy its workflow as a starting point: [`.github/workflows/coding-standard.yml`](.github/workflows/coding-standard.yml).
Customization (optional)
Config::create() ships a sensible default Finder and enables parallel runs, risky rules, and caching.
You can customize it by using your Finder instance and by overriding individual rules:
Need only the rule array (e.g. to compose your own config)?
All versions of coding-standard with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.4
dealerdirect/phpcodesniffer-composer-installer Version ^1.0
friendsofphp/php-cs-fixer Version ^3.89
slevomat/coding-standard Version ^8.29
squizlabs/php_codesniffer Version ^4.0
dealerdirect/phpcodesniffer-composer-installer Version ^1.0
friendsofphp/php-cs-fixer Version ^3.89
slevomat/coding-standard Version ^8.29
squizlabs/php_codesniffer Version ^4.0
The package interaction-design-foundation/coding-standard contains the following files
Loading the files please wait ...