src/Domain/EventSourcing/EventSourcedEntity.php
protected function handle(Event $event): void
    {
        $method = 'apply'.ClassName::short($event);

        if (!method_exists($this, $method)) {
            return;
        }

        $this->$method($event);
    }
protected function handle(Event $event): void
    {
        $method = 'apply'.ClassName::short($event);

        if (!method_exists($this, $method)) {
            return;
        }

        $this->$method($event);
    }
protected function handle ( Event $ event ) : void { $ method = 'apply' . ClassName :: short ( $ event ) ; if ( ! method_exists ( $ this , $ method ) ) { return ; } $ this -> $ method ( $ event ) ; }
Handles event if the apply method is available

This method delegates to a protected method based on the domain event
class name: 'apply'.$className

@param Event $event The domain event

@return void
Handles event if the apply method is available