name = $name; } public function getName(): string { return $this->name; } public function setName(string $name): void { $this->name = $name; } public function incrementQuantity(): void { ++$this->quantity; } public function getQuantity(): int { return $this->quantity; } public function setQuantity(int $quantity): void { $this->quantity = $quantity; } public function getDisplayQuantity(): string { if($this->quantity == 0) return "-"; return $this->quantity; } public function addPrice(float $price): void { $this->price += $price; } public function getPrice(): float { return $this->price; } public function setPrice(float $price): void { $this->price = $price; } public function getDisplayPrice(): string { if($this->quantity == 0) return "-"; return "£" . number_format($this->getPrice(), 2); } public function getTotal(): float { if($this->quantity == 0) return $this->price; return $this->quantity * $this->price; } public function getDisplayTotal(): string { return "£" . number_format($this->getTotal(), 2); } }