Contributions are welcome via Pull Requests on GitHub.
Fork the repository on GitHub, then clone your fork:
git clone https://github.com/<your-username>/structarmed.git
cd structarmed
git remote add upstream https://github.com/boundwize/structarmed.git
composer install| Command | Description |
|---|---|
composer test |
Run the test suite |
composer cs-check |
Check coding standard |
composer cs-fix |
Fix coding standard violations |
composer phpstan |
Run static analysis |
composer rector |
Check for Rector suggestions (dry-run) |
composer structarmed |
Run structarmed in this repository itself |
All checks must pass before a PR will be merged. CI runs against PHP 8.2, 8.3, and 8.4 on Linux, macOS, and Windows.
- Create your rule class in
src/Rule/Rules/{Category}/YourRule.php - Implement
RuleInterface—appliesTo()andevaluate() - Add a test in
tests/Rule/{Category}/YourRuleTest.php - Optionally add it to a relevant preset
- Create
src/Preset/Presets/YourPreset.phpimplementingPresetInterface - Define public constants for every rule key
- Add a factory method to
src/Preset/Preset.php - Add tests in
tests/Preset/ - Document it in
docs/