Call the state methods directly instead of specify the name of state.
-$factory->state('delinquent');
-$factory->states('premium', 'delinquent');
+$factory->delinquent();
+$factory->premium()->delinquent();
Configure your rector.php
:
<?php
use RectorLaravel\Rector\MethodCall\FactoryApplyingStatesRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
FactoryApplyingStatesRector::class,
]);