-
-
Save genkovich/9a37e090a40d80a41aec67a36493321c 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 | |
class Money {} | |
class Dollars extends Money {} | |
class Customer | |
{ | |
protected Money $account; | |
public function putMoneyIntoAccount(Dollars $sum): void | |
{ | |
$this->account = $sum; | |
} | |
} | |
class VIPCustomer extends Customer | |
{ | |
public function putMoneyIntoAccount(Money $sum): void | |
{ | |
$this->account = $sum; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment