Code Duplication    Length = 7-7 lines in 2 locations

src/Controller/Paypal/ConnectController.php 1 location

@@ 43-49 (lines=7) @@
40
        $authToken = $request->request->get('auth_token');
41
        if ($authToken) {
42
            $openIdTokeninfo = $this->paypalService->getIdentityService()->getAccessTokenFromAuthToken($authToken);
43
            if ($openIdTokeninfo) {
44
                return $this->render('default/dump-input-id.html.twig', [
45
                    'raw_result' => false,
46
                    'result' => $openIdTokeninfo,
47
                    'result_id' => $openIdTokeninfo->getRefreshToken()
48
                ]);
49
            }
50
        }
51
    }
52

src/Controller/Paypal/PaymentsController.php 1 location

@@ 106-112 (lines=7) @@
103
            $this->paypalService->getInvoiceService()->sendInvoice($invoice);
104
            $invoiceQR = $this->paypalService->getInvoiceService()->getInvoiceQRHTML($invoice);
105
        }
106
        if (isset($invoiceQR)) {
107
            return $this->render('default/dump-input-id.html.twig', [
108
                'raw_result' => true,
109
                'result' => $invoiceQR,
110
                'result_id' => $invoice->getId()
111
            ]);
112
        }
113
        return new JsonResponse('Error creating the Invoice, please check the logs');
114
    }
115