slimapi / coding-standard
SlimAPI Coding Standard
v2.0.1
2024-12-08 13:58 UTC
Requires
- php: ^8.3
- slevomat/coding-standard: ^8.15
- squizlabs/php_codesniffer: ^3.11
README
A PHP coding standard for better code readability, consistency, and adherence to best practices.
✨ Features
- Modern Standards: Built on PER Coding Style 2.0 and Slevomat Coding Standard.
- Customizable Rules: Check the ruleset.xml for details on the applied standards.
- Full Sniff List: Explore the sniffs list for a comprehensive overview.
📘 Documentation
Dive into our Code Style Guide for a detailed explanation of our coding practices.
📦 Installation
- Add the dependency to your project:
composer require --dev slimapi/coding-standard
- Create a
phpcs.yml
file in the project root:<ruleset name="PHP_CodeSniffer"> <rule ref="./vendor/slimapi/coding-standard/src/ruleset.xml"/> <file>src</file> </ruleset>
🛠️ Local Development & Testing
Clone the repo, then use the power of make
to simplify your workflow:
make help # See all available commands make run # Start the app container make test # Run tests and code checkers
📜 License
This project is licensed under the terms specified in the LICENSE file.
🌟 Get Involved
We welcome contributions and suggestions! Please report any issues in the issue tracker.