DispatchToHelperFunctionsRector

Use the event, dispatch, or broadcast helpers instead of static dispatch or broadcast methods.

-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,
    ]);

Other rules in the Code Quality set