An open API service indexing awesome lists of open source software.

https://github.com/vix-4800/rector-rules

Custom Rector rules
https://github.com/vix-4800/rector-rules

php rector rector-extension

Last synced: 2 days ago
JSON representation

Custom Rector rules

Awesome Lists containing this project

README

          

# Rector Rules

Custom Rector rules package.

[![Tests](https://github.com/vix-4800/rector-rules/actions/workflows/tests.yml/badge.svg)](https://github.com/vix-4800/rector-rules/actions/workflows/tests.yml)
[![PHPStan](https://github.com/vix-4800/rector-rules/actions/workflows/phpstan.yml/badge.svg)](https://github.com/vix-4800/rector-rules/actions/workflows/phpstan.yml)
[![PHP Version](https://img.shields.io/badge/php-%5E8.4-blue)](https://www.php.net/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

- [Rector Rules](#rector-rules)
- [Install](#install)
- [Usage](#usage)
- [Rules](#rules)

## Install

```bash
composer require --dev vix/rector-rules
```

## Usage

```php
withImportNames()
->withPaths([__DIR__ . '/src'])
->withSets([__DIR__ . '/vendor/vix/rector-rules/config/rules.php']);
```

## Rules

See [docs/RULES.md](docs/RULES.md) for detailed descriptions, before/after examples, and configuration notes for every rule in this package.