DispatchToHelperFunctionsRector

Use the event or dispatch helpers instead of the static dispatch method.

-ExampleEvent::dispatch($email);
+event(new ExampleEvent($email));

Configure your rector.php:

<?php

use RectorLaravel\Rector\StaticCall\DispatchToHelperFunctionsRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withRules([
        DispatchToHelperFunctionsRector::class,
    ]);