You are here

public function BankAccount::withdrawMoney in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/phpunit/phpunit/tests/_files/BankAccount.php \BankAccount::withdrawMoney()
  2. 8.0 vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php \BankAccount::withdrawMoney()
Same name and namespace in other branches
  1. 8 vendor/phpunit/phpunit/tests/_files/BankAccount.php \BankAccount::withdrawMoney()
  2. 8 vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php \BankAccount::withdrawMoney()

Withdraws an amount of money from the bank account.

Parameters

float $balance:

Throws

BankAccountException

File

vendor/phpunit/phpunit/tests/_files/BankAccount.php, line 73

Class

BankAccount
A bank account.

Code

public function withdrawMoney($balance) {
  $this
    ->setBalance($this
    ->getBalance() - $balance);
  return $this
    ->getBalance();
}