public function switchAction(Request $request, string $currency) : RedirectResponse
    {
        $result = $this->get('currency.repository')->findOneBy(['code' => $currency]);
        if (null !== $result) {
            $request->getSession()->set('_currency', $currency);
        }

        return new RedirectResponse($request->headers->get('referer'));
    }