PHPackages                             ostrolucky/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. ostrolucky/rector-rules

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

ostrolucky/rector-rules
=======================

Provides rector php rules for making the code more concise

021[7 PRs](https://github.com/ostrolucky/rector-rules/pulls)PHPCI passing

Since Apr 1Pushed 7mo ago1 watchersCompare

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

READMEChangelogDependenciesVersions (7)Used By (0)

ostrolucky/rector-rules
=======================

[](#ostroluckyrector-rules)

 **Provides rector php rules for making the code more concise**

Usage
-----

[](#usage)

### Rules

[](#rules)

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

#### RemoveUnnecessaryEmptyRector

[](#removeunnecessaryemptyrector)

```
function run(array $foos, array $bars): bool
{
-    if (!empty($foos)) {
+    if ($foos) {
      return $foos;
    }

-    return !empty($bars);
+    return (bool) $bars;
}
```

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

[](#installation)

Install this package as a dependency using [Composer](https://getcomposer.org).

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

Contributing
------------

[](#contributing)

Contributions are welcome! To contribute, please familiarize yourself with [CONTRIBUTING.md](CONTRIBUTING.md).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance44

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

Top contributor holds 78.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f56471f595636876f95264fa5c455d611329a4820193f88d22e83a5bd900292?d=identicon)[ostrolucky](/maintainers/ostrolucky)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (26 commits)")[![ostrolucky](https://avatars.githubusercontent.com/u/496233?v=4)](https://github.com/ostrolucky "ostrolucky (7 commits)")

### Embed Badge

![Health badge](/badges/ostrolucky-rector-rules/health.svg)

```
[![Health](https://phpackages.com/badges/ostrolucky-rector-rules/health.svg)](https://phpackages.com/packages/ostrolucky-rector-rules)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
