PHPackages                             iodigital-com/php-code-sniffer-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. iodigital-com/php-code-sniffer-standard

ActivePhpcodesniffer-standard[Utility &amp; Helpers](/categories/utility)

iodigital-com/php-code-sniffer-standard
=======================================

iO PHP\_CodeSniffer Standard

v29.5.0(3mo ago)127.6k↓21.4%3[1 issues](https://github.com/iodigital-com/php-code-sniffer-standard/issues)8MITPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Jun 23Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/iodigital-com/php-code-sniffer-standard)[ Packagist](https://packagist.org/packages/iodigital-com/php-code-sniffer-standard)[ RSS](/packages/iodigital-com-php-code-sniffer-standard/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (7)Dependencies (10)Versions (29)Used By (8)

iO PHP\_CodeSniffer Standard
============================

[](#io-php_codesniffer-standard)

Extending the default [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) with iO rules

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

[](#installation)

Require the package:

```
composer require --dev iodigital-com/php-code-sniffer-standard

```

Setup
-----

[](#setup)

Create a `phpcs.xml`-file in the root of your project, and include the default iO ruleset:

```

    .

    ./src/Migrations
    ./vendor
    ./local-repo

```

Modify the excluded paths and PHP versions and optionally include custom rulesets for your project.

Usage
-----

[](#usage)

Since you now have a `phpcs.xml` file in the root of your project, you can run the default phpcs command: `vendor/bin/phpcs`.

### Ignoring sniff violations

[](#ignoring-sniff-violations)

Sometimes a violation of a sniff cannot be resolved. In this case, the violation should be ignored using the `phpcs:ignore` and `phpcs:disable` / `phpcs:enable` annotations.

In order to do this, please take the following approach:

1. Ignore only the *parts* of the file that cause the violation, not the file itself. If it is *really* the case the file should be ignored, you can use the `phpcs:ignoreFile` annotation or, better, add an `` to the `ruleset.xml` of the project.
2. Prefer `phpcs:ignore` over `phpcs:disable` and `phpcs:enable`, i.e. use `phpcs:ignore` when this is possible and when the placement of the `phpcs:ignore` does not introduce any other sniff violations, use `phpcs:disable` and `phpcs:enable` otherwise. Rationale: using `phpcs:disable` and `phpcs:enable` might disable more code than initially intended when adding new code or moving existing code, for instance when refactoring code.
3. Always indicate the exact sniff or sniffs that are going to be ignored, use the complete sniff name, not only the sniff group. So for instance use `phpcs:ignore Squiz.WhiteSpace.FunctionSpacing.BeforeFirst, Squiz.WhiteSpace.FunctionSpacing.AfterLast` instead of `phpcs:ignore Squiz.WhiteSpace.FunctionSpacing` or `phpcs:ignore` without any arguments.
4. Prefer placing the `phpcs:ignore` annotation on a separate line *before* the violation over placing it on the line of the violation itself. Rationale: when ignoring multiple sniffs, the `phpcs:ignore` annotation can quickly exceed the line length limit; this is *not* checked when the `phpcs:ignore` annotation is placed on a separate line before the violation, but it is checked when the `phpcs:ignore` annotation is placed on the line of the violation itself.
5. Add an explanation why the sniff is ignored using `--` followed by a short explanation.

Example:

```
try {
    $this->logger->log(LogLevel::INFO, new DateTimeImmutable());
//phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch -- DateTimeImmutable creation cannot fail in this case
} catch (Exception $exception) {
}
```

Contributing
------------

[](#contributing)

If you want to contribute, create a merge request with **one sniff per merge request**. Please provide an example in the description of what the sniff is about with a good and bad code snippet.

**Note**: Adding new phpcs rules to this package must result in a major version update!

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance58

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community31

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 56.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~156 days

Recently: every ~192 days

Total

7

Last Release

118d ago

PHP version history (4 changes)29.0.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0

v29.1.0PHP ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

v29.3.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

v29.5.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/80809e7caf8341b1bac3d759e2b159a38b9bdab2deee5b0d4d66de6c83b992d1?d=identicon)[IntractoSupport](/maintainers/IntractoSupport)

![](https://www.gravatar.com/avatar/9e723dd83f374215e85b05fa260826f267bcef0dfb1026246ca1d845ae4f3a39?d=identicon)[JeroenNoten](/maintainers/JeroenNoten)

![](https://www.gravatar.com/avatar/6f1ed5a230a1b7a889ad5bb727fc43f070e2d57ad9f857625226096cbfcc80c7?d=identicon)[aadmathijssen](/maintainers/aadmathijssen)

![](https://www.gravatar.com/avatar/5270be3fd791a1045f0d928c0ca5d801d2c9dac77b83338a8ac877b94c6f7934?d=identicon)[mischabraam](/maintainers/mischabraam)

---

Top Contributors

[![jeroennoten](https://avatars.githubusercontent.com/u/4370753?v=4)](https://github.com/jeroennoten "jeroennoten (175 commits)")[![aadmathijssen](https://avatars.githubusercontent.com/u/3796971?v=4)](https://github.com/aadmathijssen "aadmathijssen (82 commits)")[![kanduvisla](https://avatars.githubusercontent.com/u/346681?v=4)](https://github.com/kanduvisla "kanduvisla (24 commits)")[![sjokkateer](https://avatars.githubusercontent.com/u/27890746?v=4)](https://github.com/sjokkateer "sjokkateer (8 commits)")[![francoisvdv](https://avatars.githubusercontent.com/u/290790?v=4)](https://github.com/francoisvdv "francoisvdv (5 commits)")[![GautierI](https://avatars.githubusercontent.com/u/48242616?v=4)](https://github.com/GautierI "GautierI (4 commits)")[![bertterheide](https://avatars.githubusercontent.com/u/1468911?v=4)](https://github.com/bertterheide "bertterheide (3 commits)")[![bavo-isaac](https://avatars.githubusercontent.com/u/44025160?v=4)](https://github.com/bavo-isaac "bavo-isaac (3 commits)")[![muuk-iO](https://avatars.githubusercontent.com/u/97738632?v=4)](https://github.com/muuk-iO "muuk-iO (3 commits)")[![rroubos](https://avatars.githubusercontent.com/u/8722453?v=4)](https://github.com/rroubos "rroubos (2 commits)")[![daanvanberkel](https://avatars.githubusercontent.com/u/1495807?v=4)](https://github.com/daanvanberkel "daanvanberkel (1 commits)")[![melvinversluijs](https://avatars.githubusercontent.com/u/10958064?v=4)](https://github.com/melvinversluijs "melvinversluijs (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/iodigital-com-php-code-sniffer-standard/health.svg)

```
[![Health](https://phpackages.com/badges/iodigital-com-php-code-sniffer-standard/health.svg)](https://phpackages.com/packages/iodigital-com-php-code-sniffer-standard)
```

###  Alternatives

[drupal/coder

Coder is a library to review Drupal code.

3043.6M461](/packages/drupal-coder)[mayflower/mo4-coding-standard

PHP CodeSniffer ruleset implementing the MO4 coding standards extending the Symfony coding standards.

17508.3k5](/packages/mayflower-mo4-coding-standard)[chromatic/usher

A collection of Robo commands for use on Chromatic projects.

13534.3k1](/packages/chromatic-usher)[syde/phpcs

Syde PHP coding standards for WordPress projects.

1019.7k7](/packages/syde-phpcs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
