PHPackages                             pekral/rector-rules - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. pekral/rector-rules

ActiveLibrary[Testing &amp; Quality](/categories/testing)

pekral/rector-rules
===================

An extensible package of custom Rector rules for automated PHP refactoring and coding standard enforcement.

0.4.8(4mo ago)217.1k↑679.2%[1 PRs](https://github.com/pekral/rector-rules/pulls)4MITPHPPHP ^8.4CI passing

Since Jan 6Pushed 5d ago1 watchersCompare

[ Source](https://github.com/pekral/rector-rules)[ Packagist](https://packagist.org/packages/pekral/rector-rules)[ Docs](https://github.com/pekral/rector-rules)[ GitHub Sponsors](https://github.com/sponsors/pekral)[ RSS](/packages/pekral-rector-rules/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (5)Versions (20)Used By (4)

rector-rules
============

[](#rector-rules)

[![Latest Stable Version](https://camo.githubusercontent.com/a063f900e8a147c4cf57a68bde821e233cc864397aabd9d3b0134c78ca9c75a0/68747470733a2f2f706f7365722e707567782e6f72672f70656b72616c2f726563746f722d72756c65732f762f737461626c65)](https://packagist.org/packages/pekral/rector-rules)[![Total Downloads](https://camo.githubusercontent.com/6a7dedfaa08750ee11532ee82403eef55f17bc7f392c2eaab10542a738a25d60/68747470733a2f2f706f7365722e707567782e6f72672f70656b72616c2f726563746f722d72756c65732f646f776e6c6f616473)](https://packagist.org/packages/pekral/rector-rules)[![License](https://camo.githubusercontent.com/047c7784274a8e95a6a912701bd3c4cbf32d040002021f370933667a870577d3/68747470733a2f2f706f7365722e707567782e6f72672f70656b72616c2f726563746f722d72756c65732f6c6963656e7365)](https://packagist.org/packages/pekral/rector-rules)

Latest Version License Downloads

---

🚀 Introduction
--------------

[](#-introduction)

**rector-rules** is an extensible package of custom rules for [Rector](https://github.com/rectorphp/rector) to automate code refactoring and enforce coding standards. It helps you maintain consistent code style and high code quality in your PHP projects through automated transformations.

---

📦 Installation
--------------

[](#-installation)

```
composer require --dev pekral/rector-rules
```

---

⚙️ Usage
--------

[](#️-usage)

1. Add to your `rector.php` configuration file:

```
