Code Duplication    Length = 7-7 lines in 2 locations

src/Controller/Paypal/ConnectController.php 1 location

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

src/Controller/Paypal/PaymentsController.php 1 location

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