Skip to content

Instantly share code, notes, and snippets.

@codeliner
Last active April 30, 2020 11:11
Show Gist options
  • Select an option

  • Save codeliner/f2db029bbc66dc0e20431bd51195880f to your computer and use it in GitHub Desktop.

Select an option

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);
}
}
@gitomato

Copy link
Copy Markdown

Be careful, you wrote "Destiniation" instead of "Destination" :)

@diimpp

diimpp commented Oct 18, 2017

Copy link
Copy Markdown

Shouldn't it be

function listenOn(DestinationWasChanged $event): void

?

/cc @codeliner

@enricobono

Copy link
Copy Markdown

Destiniation anywhere :)

@BenMorel

Copy link
Copy Markdown

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