Skip to content

Repository files navigation

Rector Rules for Hyperf

Latest Stable VersionTotal DownloadsGitHub license

See available Hyperf rules

Install

This package is a Rector extension developed by the Hyperf community.

Install the package as dependency:

composer require friendsofhyperf/rector --dev

Use Sets

To add a set to your config, use Rector\Hyperf\Set\HyperfSetList class and pick one of the constants:

useRector\Hyperf\Set\HyperfSetList;
useRector\Config\RectorConfig;
returnstaticfunction (RectorConfig$rectorConfig): void {
$rectorConfig->sets([
HyperfSetList::HYPERF_31
]);
};

Run Rector

the source directory (e.g. src) is optional.

1. Dry Run - Preview Changes

vendor/bin/rector process src --dry-run

2. Run Rector and Let It Change Your Code

vendor/bin/rector process src

Learn Rector Faster

Rector is a tool that we develop and share for free, so anyone can save hundreds of hours on refactoring. But not everyone has time to understand Rector and AST complexity. You have 2 ways to speed this process up:

Both ways support us to and improve Rector in sustainable way by learning from practical projects.

About

Rector Rules for Hyperf

Resources

Security policy

Stars

4 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages