. */ declare(strict_types=1); namespace FireflyIII\Handlers\Events; use FireflyIII\Events\StoredAccount; use FireflyIII\Services\Internal\Support\CreditRecalculateService; /** * Class StoredAccountEventHandler */ class StoredAccountEventHandler { public function recalculateCredit(StoredAccount $event): void { $account = $event->account; /** @var CreditRecalculateService $object */ $object = app(CreditRecalculateService::class); $object->setAccount($account); $object->recalculate(); } }