mapBizTypeToReason($bizType); if ($reason === null) { return; } $this->playerRealtime->notifyBalanceUpdate( (int) $wallet->player_id, (string) $wallet->currency_code, (int) $wallet->balance, $changeMinor, $reason, ); } private function mapBizTypeToReason(string $bizType): ?string { return match ($bizType) { 'transfer_in' => 'transfer_in', 'transfer_out' => 'transfer_out', 'transfer_out_refund', 'bet_reverse', 'reversal' => 'refund', 'bet_deduct' => 'bet', 'settle_payout', 'jackpot_manual_payout' => 'prize', default => null, }; } }