public function handle(RewardUserCommand $command) { $user = $this->userRepository->byId(UserId::fromString($command->userId())); $user->earnPoints($command->points()); $this->userRepository->save($user); }