A comprehensive set of strict PHP_CodeSniffer rules for general PHP, Laravel, and Yii2 projects to maintain high code quality standards in your projects.
- PHP 8.4 or higher
- Composer
composer require --dev vix/phpcs-sniffsCreate 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>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.
- All new sniffs must have tests
- Follow the existing code style
- Update documentation when necessary
- Ensure all checks pass (
composer testandcomposer static-analysis)
This project is licensed under the MIT License - see the LICENSE file for details.