seller, day, work type, quarters, sale */ public array $booked = []; public bool $fails = false; public function bookForOrder(int $userId, DateTimeImmutable $day, int $workTypeId, int $quarters, int $pickupNumber): bool { return $this->book($userId, $day, $workTypeId, $quarters, 0); } public function book(int $sellerId, DateTimeImmutable $day, int $workTypeId, int $quarters, int $saleId): bool { if ($this->fails) { return false; } $this->booked[] = [$sellerId, $day->format('Y-m-d'), $workTypeId, $quarters, $saleId]; return true; } }