userId; $user = $this->userRepo->find($userId); if ($user === null) { throw new DomainException("User with id: $userId doesnt exist"); } return $this->planRepo->create(new CreatePlanDto( name: $request->name, user: $user, )); } }