src/Eventing/When/ConventionBasedWhen.php
protected function when(DomainEvent $event)
    {
        $method = 'when' . ClassToString::short($event);
        if (is_callable([$this, $method])) {
            $this->{$method}($event);
        }
    }
protected function when(DomainEvent $event)
    {
        $method = 'when' . ClassToString::short($event);
        if (is_callable([$this, $method])) {
            $this->{$method}($event);
        }
    }
protected function when ( DomainEvent $ event ) { $ method = 'when' . ClassToString :: short ( $ event ) ; if ( is_callable ( [ $ this , $ method ] ) ) { $ this -> { $ method } ( $ event ) ; } }
Handle a single domain event

@param DomainEvent $event
@return void
Handle a single domain event