ostrolucky / rector-rules
Provides rector php rules for making the code more concise
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 7
pkg:composer/ostrolucky/rector-rules
Requires
- php: ^8.1
- rector/rector: ^1.0 || ^2.1
Requires (Dev)
- ramsey/devtools: ^2.0
- dev-main
- dev-dependabot/github_actions/shivammathur/setup-php-2.35.5
- dev-dependabot/github_actions/ridedott/merge-me-action-2.10.131
- dev-dependabot/github_actions/codecov/codecov-action-5.5.1
- dev-dependabot/github_actions/actions/checkout-5.0.0
- dev-dependabot/github_actions/shivammathur/setup-php-2.35.4
- dev-dependabot/github_actions/ridedott/merge-me-action-2.10.126
- dev-dependabot/github_actions/codecov/codecov-action-5.5.0
- dev-dependabot/github_actions/ramsey/composer-install-3.1.1
- dev-dependabot/composer/rector/rector-tw-1.0or-tw-2.0
This package is auto-updated.
Last update: 2025-10-01 15:09:26 UTC
README
Provides rector php rules for making the code more concise
Usage
Rules
This project provides the following rules for rector/rector:
RemoveUnnecessaryEmptyRector
function run(array $foos, array $bars): bool
{
- if (!empty($foos)) {
+ if ($foos) {
return $foos;
}
- return !empty($bars);
+ return (bool) $bars;
}
Installation
Install this package as a dependency using Composer.
composer require --dev ostrolucky/rector-rules
Contributing
Contributions are welcome! To contribute, please familiarize yourself with CONTRIBUTING.md.