pekral/rector-rules

A set of custom Rector rules for automated PHP refactoring and coding standard enforcement.

Fund package maintenance!
pekral

0.4.1 2025-07-25 12:19 UTC

This package is auto-updated.

Last update: 2025-07-25 12:45:04 UTC


README

Latest Stable Version Total Downloads License

A set of custom rules for Rector to automate code refactoring and enforce coding standards.

⚙️ Requirements

📦 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.