From db8aee493acfbf3d809cbfe1f678b22baaa4eff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 25 Oct 2021 17:59:45 +0200 Subject: [PATCH] Apply style fixes --- app/PaymentDrivers/Square/CreditCard.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/app/PaymentDrivers/Square/CreditCard.php b/app/PaymentDrivers/Square/CreditCard.php index b0791b12104b..eb5d5333dd1a 100644 --- a/app/PaymentDrivers/Square/CreditCard.php +++ b/app/PaymentDrivers/Square/CreditCard.php @@ -21,13 +21,10 @@ use App\Models\PaymentType; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\SquarePaymentDriver; use App\Utils\Traits\MakesHash; -use Illuminate\Contracts\View\Factory; -use Illuminate\Contracts\Container\BindingResolutionException; use Illuminate\Http\RedirectResponse; use Illuminate\Support\Str; use Illuminate\View\View; use Square\Http\ApiResponse; -use Symfony\Component\Routing\Exception\RouteNotFoundException; class CreditCard implements MethodInterface { @@ -43,8 +40,8 @@ class CreditCard implements MethodInterface /** * Authorization page for credit card. - * - * @param array $data + * + * @param array $data * @return View */ public function authorizeView($data): View @@ -56,9 +53,9 @@ class CreditCard implements MethodInterface /** * Handle authorization for credit card. - * - * @param Request $request - * @return RedirectResponse + * + * @param Request $request + * @return RedirectResponse */ public function authorizeResponse($request): RedirectResponse { @@ -114,8 +111,9 @@ class CreditCard implements MethodInterface $body->setLocationId($this->square_driver->company_gateway->getConfigField('locationId')); $body->setReferenceId(Str::random(16)); - if($request->has('verificationToken') && $request->input('verificationToken')) + if ($request->has('verificationToken') && $request->input('verificationToken')) { $body->setVerificationToken($request->input('verificationToken')); + } if ($request->shouldUseToken()) { $body->setCustomerId($cgt->gateway_customer_reference); @@ -191,9 +189,9 @@ class CreditCard implements MethodInterface $customers = $api_response->getBody(); $customers = json_decode($customers); - if(count(array($api_response->getBody(),1)) == 0) + if (count([$api_response->getBody(),1]) == 0) { $customers = false; - + } } else { $errors = $api_response->getErrors(); }