subscription instanceof SubscriptionEntity ? $cmd->subscription : $this->repo->ofId($cmd->subscription); $sub->renew(); // Dispatch the subscription usage reset event $event = new SubscriptionUsageResetEvent($sub); $this->dispatcher->dispatch($event); return $sub; } }