Replace use of the unsafe empty() function with Laravel's safer blank() & filled() functions.
-empty([]);
-!empty([]);
+blank([]);
+filled([]);
Configure your rector.php
:
<?php
use RectorLaravel\Rector\Empty_\EmptyToBlankAndFilledFuncRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
EmptyToBlankAndFilledFuncRector::class,
]);