PHPackages                             vix/phpcs-sniffs - 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. vix/phpcs-sniffs

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

vix/phpcs-sniffs
================

Custom PHP\_CodeSniffer ruleset for strict development standards

v0.3.0(3w ago)014MITPHPPHP ^8.3CI passing

Since Nov 25Pushed 2w agoCompare

[ Source](https://github.com/vix-4800/phpcs-sniffs)[ Packagist](https://packagist.org/packages/vix/phpcs-sniffs)[ RSS](/packages/vix-phpcs-sniffs/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (9)Versions (26)Used By (0)

VixPHPCS - PHP\_CodeSniffer Custom Ruleset
==========================================

[](#vixphpcs---php_codesniffer-custom-ruleset)

[![PHPStan](https://github.com/vix-4800/phpcs-sniffs/actions/workflows/phpstan.yml/badge.svg)](https://github.com/vix-4800/phpcs-sniffs/actions/workflows/phpstan.yml)[![Tests](https://github.com/vix-4800/phpcs-sniffs/actions/workflows/tests.yml/badge.svg)](https://github.com/vix-4800/phpcs-sniffs/actions/workflows/tests.yml)[![PHP Version](https://camo.githubusercontent.com/504ead6a583c68d8d62d7bfceed24e569ca613d7a36bed380281b3455b5c7b31/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e342d626c7565)](https://www.php.net/)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

A comprehensive set of strict PHP\_CodeSniffer rules for general PHP, Laravel, and Yii2 projects to maintain high code quality standards in your projects.

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

[](#installation)

### Requirements

[](#requirements)

- PHP 8.4 or higher
- Composer

### Install via Composer

[](#install-via-composer)

```
composer require --dev vix/phpcs-sniffs
```

Usage
-----

[](#usage)

### Basic Configuration

[](#basic-configuration)

Create a `phpcs.xml` file in your project root:

```

    My project coding standard

    src
    tests

```

Sniffs
------

[](#sniffs)

The package ships with the `VixPHPCS` ruleset. Alternatively, individual standalone sniffs can be enabled manually. The catalog includes return-type consistency rules such as forbidding nullable `bool` returns in function and method signatures/docblocks. See [docs/SNIFFS.md](docs/SNIFFS.md) for the full catalog, examples, and configurable parameters.

Development
-----------

[](#development)

### Guidelines

[](#guidelines)

- All new sniffs must have tests
- Follow the existing code style
- Update documentation when necessary
- Ensure all checks pass (`composer test` and `composer static-analysis`)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Additional Resources
--------------------

[](#additional-resources)

- [PHP\_CodeSniffer Documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki)
- [Creating Custom Sniffs](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance96

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.9% 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 ~21 days

Recently: every ~39 days

Total

9

Last Release

22d ago

### Community

Maintainers

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

---

Top Contributors

[![vix-4800](https://avatars.githubusercontent.com/u/55950607?v=4)](https://github.com/vix-4800 "vix-4800 (195 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")

---

Tags

phpcsdevstatic analysiscode sniffercoding-standards

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vix-phpcs-sniffs/health.svg)

```
[![Health](https://phpackages.com/badges/vix-phpcs-sniffs/health.svg)](https://phpackages.com/packages/vix-phpcs-sniffs)
```

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k130.4M2.1k](/packages/slevomat-coding-standard)[wp-coding-standards/wpcs

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

2.8k45.9M2.0k](/packages/wp-coding-standards-wpcs)[escapestudios/symfony2-coding-standard

CodeSniffer ruleset for the Symfony 2+ coding standard

41011.4M292](/packages/escapestudios-symfony2-coding-standard)[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.

22732.9M700](/packages/phpcompatibility-phpcompatibility-wp)[sirbrillig/phpcs-variable-analysis

A PHPCS sniff to detect problems with variables.

14551.0M116](/packages/sirbrillig-phpcs-variable-analysis)[phpcsstandards/phpcsextra

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

10327.7M59](/packages/phpcsstandards-phpcsextra)

PHPackages © 2026

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