Skip to content

Instantly share code, notes, and snippets.

@codeliner
Last active April 30, 2020 11:11
Show Gist options
  • Save codeliner/f2db029bbc66dc0e20431bd51195880f to your computer and use it in GitHub Desktop.
Save codeliner/f2db029bbc66dc0e20431bd51195880f to your computer and use it in GitHub Desktop.
getprooph.org sample snippet
<?php
declare(strict_types=1);
class CargoRouteListener extends ProcessManager
{
function listenOn(DestiniationWasChanged $event)
{
$rerouteCargo = RerouteCargo::to(
$event->newDestination(),
$event->cargoId()
);
$this->commandBus->dispatch($rerouteCargo);
}
}
@BenMorel
Copy link

And because gist comments and mentions don't trigger notifications, @codeliner will never be aware of the typo :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment