PHPackages                             ergebnis/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ergebnis/rector-rules

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ergebnis/rector-rules
=====================

Provides rules for rector/rector.

1.15.2(1mo ago)9171.9k↑78.7%[1 PRs](https://github.com/ergebnis/rector-rules/pulls)20MITPHPPHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

Since Sep 30Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/ergebnis/rector-rules)[ Packagist](https://packagist.org/packages/ergebnis/rector-rules)[ Docs](https://github.com/ergebnis/rector-rules)[ RSS](/packages/ergebnis-rector-rules/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (26)Versions (42)Used By (20)

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

[](#rector-rules)

[![Integrate](https://github.com/ergebnis/rector-rules/workflows/Integrate/badge.svg)](https://github.com/ergebnis/rector-rules/actions)[![Merge](https://github.com/ergebnis/rector-rules/workflows/Merge/badge.svg)](https://github.com/ergebnis/rector-rules/actions)[![Release](https://github.com/ergebnis/rector-rules/workflows/Release/badge.svg)](https://github.com/ergebnis/rector-rules/actions)[![Renew](https://github.com/ergebnis/rector-rules/workflows/Renew/badge.svg)](https://github.com/ergebnis/rector-rules/actions)

[![Code Coverage](https://camo.githubusercontent.com/ed1727cca8c560308a2083de45b96d38797c277036775b0bbbfd97ac16d96a42/68747470733a2f2f636f6465636f762e696f2f67682f65726765626e69732f726563746f722d72756c65732f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/ergebnis/rector-rules)

[![Latest Stable Version](https://camo.githubusercontent.com/fce8b65c225a5e45d60499d8df8e6b719cf750ed89759910f517c102d9707782/68747470733a2f2f706f7365722e707567782e6f72672f65726765626e69732f726563746f722d72756c65732f762f737461626c65)](https://packagist.org/packages/ergebnis/rector-rules)[![Total Downloads](https://camo.githubusercontent.com/998f5bf9b35249e1085f2afb244cc430b2f06c0bbb2213a54f27fe5e04029bc0/68747470733a2f2f706f7365722e707567782e6f72672f65726765626e69732f726563746f722d72756c65732f646f776e6c6f616473)](https://packagist.org/packages/ergebnis/rector-rules)[![Monthly Downloads](https://camo.githubusercontent.com/8531089e81dacfa56539657d1f1d24820ba997c92efbef536c732aafe81f32b5/687474703a2f2f706f7365722e707567782e6f72672f65726765626e69732f726563746f722d72756c65732f642f6d6f6e74686c79)](https://packagist.org/packages/ergebnis/rector-rules)

This project provides a [`composer`](https://getcomposer.org) package with rules for [`rector/rector`](https://github.com/rectorphp/rector).

Installation
------------

[](#installation)

Run

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

Rules
-----

[](#rules)

This project provides the following rules for [`rector/rector`](https://github.com/rectorphp/rector):

- [`Ergebnis\Rector\Rules\Arrays\SortAssociativeArrayByKeyRector`](https://github.com/ergebnis/rector-rules#arrayssortassociativearraybykeyrector)
- [`Ergebnis\Rector\Rules\Faker\GeneratorPropertyFetchToMethodCallRector`](https://github.com/ergebnis/rector-rules#fakergeneratorpropertyfetchtomethodcallrector)
- [`Ergebnis\Rector\Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector`](https://github.com/ergebnis/rector-rules#filesreferencenamespacedsymbolsrelativetonamespaceprefixrector)

### Arrays

[](#arrays)

#### `Arrays\SortAssociativeArrayByKeyRector`

[](#arrayssortassociativearraybykeyrector)

This rule sorts associative arrays by key.

```
