vix / phpcs-sniffs
Custom PHP_CodeSniffer ruleset for strict development standards
Package info
github.com/vix-4800/phpcs-sniffs
Type:phpcodesniffer-standard
pkg:composer/vix/phpcs-sniffs
Requires
- php: ^8.3
- dealerdirect/phpcodesniffer-composer-installer: ^1.2.0
- squizlabs/php_codesniffer: ^4.0.1
Requires (Dev)
- captainhook/captainhook: ^5.29.2
- friendsofphp/php-cs-fixer: ^3.94.2
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.1.44
- phpstan/phpstan-strict-rules: ^2.0.10
- phpunit/phpunit: ^13.0.5
- slevomat/coding-standard: ^8.28.1
- dev-main
- v0.3.0
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.0
- dev-copilot/update-documentation-and-tests
- dev-copilot/enforce-final-methods-in-traits
- dev-copilot/create-sniff-tests-update-docs
- dev-copilot/create-sniff-tests-update-docs-again
- dev-copilot/create-sniff-add-tests-update-docs
- dev-copilot/create-sniff-tests-mixed-array-key-types
- dev-copilot/update-documentation-tests-and-sniff
- dev-copilot/add-sniff-tests-and-docs
- dev-copilot/add-sniff-tests-docs
- dev-copilot/create-sniff-tests-update-docs-another-one
- dev-copilot/update-documentation-and-add-tests
- dev-copilot/enforce-boolean-operators
- dev-copilot/add-duplicate-array-key-sniff
This package is auto-updated.
Last update: 2026-05-20 07:46:32 UTC
README
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
Requirements
- PHP 8.4 or higher
- Composer
Install via Composer
composer require --dev vix/phpcs-sniffs
Usage
Basic Configuration
Create a phpcs.xml file in your project root:
<?xml version="1.0"?> <ruleset name="MyProject"> <description>My project coding standard</description> <!-- Paths to check --> <file>src</file> <file>tests</file> <!-- Use VixPHPCS rules --> <rule ref="VixPHPCS"/> </ruleset>
Sniffs
The package ships with the VixPHPCS ruleset. Alternatively, individual standalone sniffs can be enabled manually. See docs/SNIFFS.md for the full catalog, examples, and configurable parameters.
Development
Guidelines
- All new sniffs must have tests
- Follow the existing code style
- Update documentation when necessary
- Ensure all checks pass (
composer testandcomposer static-analysis)
License
This project is licensed under the MIT License - see the LICENSE file for details.