PHPackages                             iodigital-com/php-code-sniffer-baseliner - 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-baseliner

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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

IO PHP Code Sniffer Baseliner

v3.2.1(1y ago)635.6k↓25.8%1[1 issues](https://github.com/iodigital-com/php-code-sniffer-baseliner/issues)MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0CI passing

Since Jan 13Pushed 1y ago8 watchersCompare

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

READMEChangelog (4)Dependencies (7)Versions (21)Used By (0)

PHP\_CodeSniffer Baseliner
==========================

[](#php_codesniffer-baseliner)

This tool enables you to integrate PHP\_CodeSniffer into an existing project by automatically adding `phpcs:ignore` and `phpcs:disable`/`phpcs:enable` instructions throughout the codebase as a baseline. This allows you to make PHP\_CodeSniffer pass without changing any source code, making it possible to use PHP\_CodeSniffer in e.g. continuous integration pipelines or git hooks. This way, you can enforce that all new code adheres to your coding standard without touching the existing code.

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

[](#installation)

Require the package with composer:

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

It is also possible to install this package as a global composer dependency.

Usage
-----

[](#usage)

In order to add `phpcs:ignore` and `phpcs:disable`/`phpcs:enable` instructions throughout your project, run:

```
vendor/bin/phpcs-baseliner create-baseline
```

How does it work?
-----------------

[](#how-does-it-work)

First, the tool runs `vendor/bin/phpcs` and captures the report. Based on the report output, it will add `// phpcs:ignore` instructions to the source code for each violation. It will only ignore the sniffs that actually are violated. In rare cases, adding these instructions could introduce new violations. Therefore, this process is repeated until no violations are reported by `phpcs`.

Example
-------

[](#example)

Let's say we want to enforce `declare(strict_types = 1);` statements and native property type hints using PHP\_CodeSniffer. The Slevomat Coding Standard has sniffs for this: `SlevomatCodingStandard.TypeHints.DeclareStrictTypes`and `SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint`. We install Slevomat Coding Standard and add the sniffs to our ruleset in `phpcs.xml`.

If we now run `vendor/bin/phpcs-baseliner create-baseline` in our project, it will add ignore instructions in all files not containing `declare(strict_types = 1);` statements or native property type declarations:

```
- `.
- Support ignoring violations on the first line of a file that end with a multi-line string, example: ```

    ```
- Support detection of and merging with older types of ignore instructions, such as `@phpcsSuppress`.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance45

Moderate activity, may be stable

Popularity34

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 87.1% 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 ~120 days

Recently: every ~223 days

Total

17

Last Release

384d ago

Major Versions

v1.1.0 → v2.0.02021-01-11

v2.3.1 → v3.0.02023-10-19

PHP version history (7 changes)v2.0.0PHP ~7.3.0 || ~7.4.0 || ~8.0.0

v2.2.0PHP ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0

v2.3.0PHP ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0

v3.0.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0

v3.1.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

v3.2.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

v3.2.1PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.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 (74 commits)")[![youriseijkens-io](https://avatars.githubusercontent.com/u/120475374?v=4)](https://github.com/youriseijkens-io "youriseijkens-io (3 commits)")[![muuk-iO](https://avatars.githubusercontent.com/u/97738632?v=4)](https://github.com/muuk-iO "muuk-iO (2 commits)")[![aadmathijssen](https://avatars.githubusercontent.com/u/3796971?v=4)](https://github.com/aadmathijssen "aadmathijssen (1 commits)")[![melvinversluijs](https://avatars.githubusercontent.com/u/10958064?v=4)](https://github.com/melvinversluijs "melvinversluijs (1 commits)")[![thomasheller](https://avatars.githubusercontent.com/u/2400778?v=4)](https://github.com/thomasheller "thomasheller (1 commits)")[![leonhusmann](https://avatars.githubusercontent.com/u/18326637?v=4)](https://github.com/leonhusmann "leonhusmann (1 commits)")[![bertterheide](https://avatars.githubusercontent.com/u/1468911?v=4)](https://github.com/bertterheide "bertterheide (1 commits)")[![francoisvdv](https://avatars.githubusercontent.com/u/290790?v=4)](https://github.com/francoisvdv "francoisvdv (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20269.1k13](/packages/shopsys-coding-standards)[flyeralarm/php-code-validator

A custom coding standard for FLYERALARM

2226.9k6](/packages/flyeralarm-php-code-validator)

PHPackages © 2026

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