PHPackages                             phpcsstandards/phpcsdevcs - 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. phpcsstandards/phpcsdevcs

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

phpcsstandards/phpcsdevcs
=========================

Coding Standards ruleset for the code in external standards for PHP\_CodeSniffer.

1.3.0(5mo ago)9704.3k↓25.5%1[4 issues](https://github.com/PHPCSStandards/PHPCSDevCS/issues)6LGPL-3.0-or-laterPHP &gt;=5.4CI passing

Since Feb 12Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/PHPCSStandards/PHPCSDevCS)[ Packagist](https://packagist.org/packages/phpcsstandards/phpcsdevcs)[ GitHub Sponsors](https://github.com/PHPCSStandards)[ GitHub Sponsors](https://github.com/jrfnl)[ RSS](/packages/phpcsstandards-phpcsdevcs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (13)Used By (6)

PHPCSDevCS for developers of PHP\_CodeSniffer sniffs
====================================================

[](#phpcsdevcs-for-developers-of-php_codesniffer-sniffs)

[![Latest Stable Version](https://camo.githubusercontent.com/1bc18e25afb866f4dc1a10bd186955e45d574f4aa8669b131309f3b0a9181f1e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687063737374616e64617264732f706870637364657663733f6c6162656c3d737461626c65)](https://packagist.org/packages/phpcsstandards/phpcsdevcs)[![Release Date of the Latest Version](https://camo.githubusercontent.com/37bfae82562fa9778893bf5285ea121fd660fe6e312baa8220151db0945b4718/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f50485043535374616e64617264732f504850435344657643532e7376673f6d61784167653d31383030)](https://github.com/PHPCSStandards/PHPCSDevCS/releases)🚧 [![Latest Unstable Version](https://camo.githubusercontent.com/c2f949b5352e7183f04e2534bbf3c6241d0a479a934e328d2e75d04d5f5c0f4f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f756e737461626c652d6465762d2d6d61696e2d6536383731382e7376673f6d61784167653d32343139323030)](https://packagist.org/packages/phpcsstandards/phpcsdevcs#dev-main)[![Build Status](https://github.com/PHPCSStandards/PHPCSDevCS/actions/workflows/ci.yml/badge.svg)](https://github.com/PHPCSStandards/PHPCSDevCS/actions/workflows/ci.yml)[![Last Commit to Unstable](https://camo.githubusercontent.com/9ad2e82a96ef69960dcff18f29543f031a203d7b81190a94d54d997a8d85a2f4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f50485043535374616e64617264732f504850435344657643532f6d61696e2e737667)](https://github.com/PHPCSStandards/PHPCSDevCS/commits/main)

[![Minimum PHP Version](https://camo.githubusercontent.com/98fd6a7fcc03fa69b514eff305be8c7ecdacf2506c67db50873bd4f64ad9629d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f70687063737374616e64617264732f706870637364657663732e7376673f6d61784167653d33363030)](https://packagist.org/packages/phpcsstandards/phpcsdevcs)[![License: LGPLv3](https://camo.githubusercontent.com/95dffd2a1613da5467fb415289f3e60dbac49e70eded959f569f0103d9e96b7f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f50485043535374616e64617264732f50485043534465764353)](https://github.com/PHPCSStandards/PHPCSDevCS/blob/main/LICENSE)[![Awesome](https://camo.githubusercontent.com/e3718252e9cb9d236e13f891808bc5861337368a897129bbdcb34f1c89ce1d77/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f617765736f6d652533462d796573212d627269676874677265656e2e737667)](https://camo.githubusercontent.com/e3718252e9cb9d236e13f891808bc5861337368a897129bbdcb34f1c89ce1d77/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f617765736f6d652533462d796573212d627269676874677265656e2e737667)

This is an external ruleset for [PHP CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) intended for use by sniff developers.

- [Installation](#installation)
    - [Composer Project-based Installation](#composer-project-based-installation)
    - [Composer Global Installation](#composer-global-installation)
- [PHPCSDev ruleset for sniff repos](#phpcsdev-ruleset-for-sniff-repos)
    - [Using the ruleset from the command line](#using-the-ruleset-from-the-command-line)
    - [Using the ruleset from within a project based ruleset](#using-the-ruleset-from-within-a-project-based-ruleset)
- [Contributing](#contributing)
- [License](#license)

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

[](#installation)

### Composer Project-based Installation

[](#composer-project-based-installation)

Run the following from the root of your project:

```
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev phpcsstandards/phpcsdevcs:"^1.0"
```

### Composer Global Installation

[](#composer-global-installation)

If you work on several different sniff repos, you may want to install this toolset globally:

```
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require --dev phpcsstandards/phpcsdevcs:"^1.0"
```

Composer will automatically install dependencies and register the PHPCSDev and other external standards with PHP\_CodeSniffer using the [Composer PHPCS plugin](https://github.com/PHPCSStandards/composer-installer).

PHPCSDev ruleset for sniff repos
--------------------------------

[](#phpcsdev-ruleset-for-sniff-repos)

Once this project is installed, you will see a new `PHPCSDev` ruleset in the list of installed standards when you run `phpcs -i`.

**Important: This ruleset currently requires PHP\_CodeSniffer &gt;= `3.13.0+`.**

> As sniffs developers will mostly work with the latest version of PHP\_CodeSniffer, this shouldn't cause any problems.
>
> Similarly, the CS check in automated CI runs should normally be run on a high PHPCS version for the best results.

The `PHPCSDev` standard can be used by sniff developers to check the code style of their sniff repo code.

Often, sniff repos will use the code style of the standard they are adding. However, not all sniff repos are actually about code style.

So for those repos which need a basic standard which will still keep their code-base consistent, this standard should be useful.

The standard checks your code against the following:

- Compliance with [PSR-12](https://www.php-fig.org/psr/psr-12/), with a few exceptions.
- Use of camelCase variable and function names.
- Use of normalized arrays.
- All files, classes, functions and properties are documented with a docblock and contain the minimally needed information.
- A number of arbitrary additional code style and QA checks.
- PHP cross-version compatibility, while allowing for the tokens back-filled by PHPCS itself. Note: for optimal results, the project custom ruleset should set the `testVersion` config variable. This is not done by default as config variables are currently [difficult](https://github.com/squizlabs/PHP_CodeSniffer/issues/2197) [to overrule](https://github.com/squizlabs/PHP_CodeSniffer/issues/1821).

The ruleset can be used like any other ruleset and specific sniffs and settings can be added to or overruled from a custom project based ruleset.

### Using the ruleset from the command line

[](#using-the-ruleset-from-the-command-line)

```
phpcs . --standard=PHPCSDev
```

### Using the ruleset from within a project based ruleset

[](#using-the-ruleset-from-within-a-project-based-ruleset)

Add the following line to your project's `phpcs.xml.dist` file:

```

```

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

[](#contributing)

Contributions to this project are welcome. Just clone the repo, branch off from `main`, make your changes, commit them and send in a pull request.

If unsure whether the changes you are proposing would be welcome, open an issue first to discuss your proposal.

License
-------

[](#license)

This code is released under the GNU Lesser General Public License (LGPLv3). For more information, visit

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance72

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.4% 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 ~236 days

Recently: every ~331 days

Total

10

Last Release

161d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c276f443673da81d365a16828d46818ea4e3136f7ce05491abcc70f43c82fa4c?d=identicon)[jrfnl](/maintainers/jrfnl)

---

Top Contributors

[![jrfnl](https://avatars.githubusercontent.com/u/663378?v=4)](https://github.com/jrfnl "jrfnl (141 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![fredden](https://avatars.githubusercontent.com/u/334786?v=4)](https://github.com/fredden "fredden (1 commits)")[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (1 commits)")

---

Tags

phpcsstatic analysisPHP\_CodeSnifferphpcodesniffer-standard

### Embed Badge

![Health badge](/badges/phpcsstandards-phpcsdevcs/health.svg)

```
[![Health](https://phpackages.com/badges/phpcsstandards-phpcsdevcs/health.svg)](https://phpackages.com/packages/phpcsstandards-phpcsdevcs)
```

###  Alternatives

[wp-coding-standards/wpcs

PHP\_CodeSniffer rules (sniffs) to enforce WordPress coding conventions

2.8k42.5M1.6k](/packages/wp-coding-standards-wpcs)[phpcsstandards/phpcsextra

A collection of sniffs and standards for use with PHP\_CodeSniffer.

10324.3M44](/packages/phpcsstandards-phpcsextra)[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

598161.9M1.9k](/packages/dealerdirect-phpcodesniffer-composer-installer)[phpcompatibility/phpcompatibility-wp

A ruleset for PHP\_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.

22130.6M587](/packages/phpcompatibility-phpcompatibility-wp)[escapestudios/symfony2-coding-standard

CodeSniffer ruleset for the Symfony 2+ coding standard

40611.1M275](/packages/escapestudios-symfony2-coding-standard)[sirbrillig/phpcs-variable-analysis

A PHPCS sniff to detect problems with variables.

14548.5M97](/packages/sirbrillig-phpcs-variable-analysis)

PHPackages © 2026

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