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

@@ 119-125 (lines=7) @@
116
            $this->paypalService->getInvoiceService()->sendInvoice($invoice);
117
            $invoiceQR = $this->paypalService->getInvoiceService()->getInvoiceQRHTML($invoice);
118
        }
119
        if (isset($invoiceQR)) {
120
            return $this->render('default/dump-input-id.html.twig', [
121
                'raw_result' => true,
122
                'result' => $invoiceQR,
123
                'result_id' => $invoice->getId()
124
            ]);
125
        }
126
        return new JsonResponse('Error creating the Invoice, please check the logs');
127
    }
128