ostrolucky / rector-rules
Provides rector php rules for making the code more concise
dev-main
2024-11-01 15:30 UTC
Requires
- php: ^8.1
- rector/rector: ^1.0
Requires (Dev)
- ramsey/devtools: ^2.0
This package is auto-updated.
Last update: 2024-12-01 16:02:47 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.