Last active
December 11, 2019 19:19
-
-
Save ivastly/9dc0ebdc94d84bc7516f2ad0006953f0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
namespace Ivastly\GoAopHelloWorld\BankingSystem; | |
use League\CLImate\CLImate; | |
class Bank | |
{ | |
/** @var CLImate */ | |
private $climate; | |
public function __construct(CLImate $climate) | |
{ | |
$this->climate = $climate; | |
} | |
public function sendMoney(int $amount, string $recipient): void | |
{ | |
$this->climate->backgroundGreen("Bank: {$amount}€ was sent to $recipient"); | |
} | |
public function withdrawMoney(int $amount, string $payer): void | |
{ | |
$this->climate->backgroundRed("Bank: {$amount}€ was deducted from $payer account"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment