PHPackages                             dpinfo/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. dpinfo/coding-standard

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

dpinfo/coding-standard
======================

DPI - Coding Standard - PHP Code Sniffer rules

3.9(6y ago)081MITPHPPHP ~7.1

Since May 5Pushed 6y agoCompare

[ Source](https://github.com/dpinfo/coding-standard)[ Packagist](https://packagist.org/packages/dpinfo/coding-standard)[ RSS](/packages/dpinfo-coding-standard/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (6)Versions (35)Used By (0)

Dpi Coding Standard
===================

[](#dpi-coding-standard)

> \*\*Initial library from Consistence Coding Standard

> **Complete standard is described in a [separate document](dpi-coding-standard.md)**.

This is a custom coding standard, which is used by all DPI projects. It is also suitable to be used with any other project or as a foundation for your own standard.

The main objectives of this standard are:

- Strict (and predictable) code.
- Prevent common mistakes.
- Readability over writability (character count).
- Be friendly to diffs - minimize impact of changes.
- Do not write unnecessary/unreliable information.

Automatic checks
----------------

[](#automatic-checks)

Automatic checks of this standard are implemented as sniffs for [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) (`phpcs`), but not all the rules are checked yet. PHP\_CodeSniffer contains also tool for automatic correction of certain errors `phpcbf`, but this tool is also not 100% reliable - results produced by this may not conform to this standard.

These checks also include some code analysis tools, such as detecting unreachable code etc. These are not part of the standard, but should be helpful.

Stability
---------

[](#stability)

This package uses [SemVer](http://semver.org/) with following rules.

Coding Standard document should be considered the source of truth and main object of SemVer.

- `MAJOR` version will be incremented if new rules are added to the document.
- `MINOR` version will be incremented if new sniffs are implemented to check for existing described rules.
- `PATCH` version will be incremented for bug fixing - fixing a bug is considered everything which does not conform to the document - this may even lead to (temporarily) disabling an existing sniff - or part of it, until a better check is available or it is properly fixed.

The implementation of the automatic checks (both custom sniffs and the ruleset.xml file) are not subject to the SemVer and may change over time to accommodate changes in PHP\_CodeSniffer and provided default sniffs, which are used also by this standard.

Recommended dependency on this package is on `MINOR` version (e.g. `~1.0.0`), which means effectively:

- No new rules will be added.
- New automatic checks may be added.
- You get fixes for existing automatic checks, or some of them may be disabled, if regressions are found.

Installation &amp; usage
------------------------

[](#installation--usage)

Install package [`dpinfo/coding-standard`](https://packagist.org/packages/Dpi/coding-standard) with [Composer](https://getcomposer.org/):

```
composer require --dev dpinfo/coding-standard
```

Then run `phpcs` with this standard:

```
vendor/bin/phpcs --standard=vendor/dpinfo/coding-standard/Dpi/ruleset.xml --extensions=php --encoding=utf-8 -sp src
```

For further usage options see the [PHP\_CodeSniffer documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 93.2% 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 ~49 days

Recently: every ~78 days

Total

32

Last Release

2503d ago

Major Versions

0.13 → 1.02017-05-04

1.1 → 2.02017-06-16

2.4 → 3.02018-03-23

PHP version history (5 changes)0.5PHP ~5.5

0.8PHP ~5.5|~7.0

0.10PHP ~5.6|~7.0

1.0PHP ~7.0

3.0PHP ~7.1

### Community

Maintainers

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

---

Top Contributors

[![VasekPurchart](https://avatars.githubusercontent.com/u/406821?v=4)](https://github.com/VasekPurchart "VasekPurchart (109 commits)")[![mhujer](https://avatars.githubusercontent.com/u/353372?v=4)](https://github.com/mhujer "mhujer (5 commits)")[![SylvainFlattet](https://avatars.githubusercontent.com/u/6397912?v=4)](https://github.com/SylvainFlattet "SylvainFlattet (2 commits)")[![Vrtak-CZ](https://avatars.githubusercontent.com/u/112567?v=4)](https://github.com/Vrtak-CZ "Vrtak-CZ (1 commits)")

---

Tags

phpcsstandardcodesnifferPHPCodeSniffersniffercodingcsCoding Standardruleset

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dpinfo-coding-standard/health.svg)

```
[![Health](https://phpackages.com/badges/dpinfo-coding-standard/health.svg)](https://phpackages.com/packages/dpinfo-coding-standard)
```

###  Alternatives

[consistence/coding-standard

Consistence - Coding Standard - PHP Code Sniffer rules

75833.3k94](/packages/consistence-coding-standard)[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

596161.9M1.9k](/packages/dealerdirect-phpcodesniffer-composer-installer)[doctrine/coding-standard

The Doctrine Coding Standard is a set of PHPCS rules applied to all Doctrine projects.

31914.1M739](/packages/doctrine-coding-standard)[moodlehq/moodle-cs

Moodle Coding Sniffer rules

242.8M5](/packages/moodlehq-moodle-cs)[leroy-merlin-br/coding-standard

The coding standard for PHP projects on LMBR

2137.0k10](/packages/leroy-merlin-br-coding-standard)

PHPackages © 2026

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