예제 #1
0
 public function __invoke(Account $account)
 {
     $accountId = $account->getId();
     $accountEmail = $account->getEmail();
     $this->accountRepository->deleteAccount($account);
     return ['id' => $accountId, 'email' => $accountEmail, 'entity' => $account];
 }
예제 #2
0
 public function deleteAccount(int $accountId) : Account
 {
     $account = $this->getById($accountId);
     $this->accountRepository->deleteAccount($account);
     return $account;
 }