示例#1
0
 public function freezeFunds(Account $account, $amount)
 {
     if (bccomp($account->getBalance(), $amount, Decimal::$scale) === -1) {
         throw new NotEnoughFundException("Not enough founds");
     }
     $account->freeze($amount);
     $this->em->persist($account);
 }