diff --git a/app/Plan/CreatePlanDto.php b/app/Plan/CreatePlanDto.php new file mode 100644 index 0000000..5aed171 --- /dev/null +++ b/app/Plan/CreatePlanDto.php @@ -0,0 +1,10 @@ +nextId(); + $plan = new Plan( + id: $id, + name: $dto->name, + ); + $this->existingPlans[$id] = $plan; + + return $plan; + } + + private function nextId(): int + { + return count($this->existingPlans); + } +}