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