pekral / rector-rules
A set of custom Rector rules for automated PHP refactoring and coding standard enforcement.
Fund package maintenance!
pekral
Installs: 3 201
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.4
- rector/rector: ^2.1.2
Requires (Dev)
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2025-07-25 12:45:04 UTC
README
A set of custom rules for Rector to automate code refactoring and enforce coding standards.
⚙️ Requirements
- PHP >= 8.4
- Rector >= 2.1.2
📦 Installation
composer require --dev pekral/rector-rules
🚀 Usage
Add to your rector.php
configuration file:
<?php return static function (Rector\Config\RectorConfig $rectorConfig): void { $rectorConfig->import(__DIR__ . '/vendor/pekral/rector-rules/rector.php'); };
📝 Example
Run Rector with your custom rules:
vendor/bin/rector process src
🤝 Contributing
Contributions, issues and feature requests are welcome! Feel free to check issues page.
🪪 License
This project is licensed under the MIT License - see the LICENSE file for details.
ℹ️ About
rector-rules is maintained by Petr Král.