Created
March 13, 2025 19:50
-
-
Save trikitrok/24a1646952eadfd9802628c74ef3ffea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Customer { | |
public function getEarnedDiscount(): float; | |
public function addToOrdersHistory(Order $order): void; | |
} | |
// Null Customer's implementation | |
class NotFoundCustomer implements Customer { | |
private float $DEFAULT_DISCOUNT = 1.0; | |
public function getEarnedDiscount(): float { | |
return $this->DEFAULT_DISCOUNT; | |
} | |
// Refused bequest??? | |
public function addToOrdersHistory(Order $order): void { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment