From 2cd0122d3448f3da93332d65b86df9a8de44c105 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Mar 2018 20:59:23 +0100 Subject: [PATCH] Fix phpcs --- htdocs/stripe/charge.php | 2 +- htdocs/stripe/class/stripe.class.php | 18 +++++++++--------- htdocs/stripe/transaction.php | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index d13235c4f01..9ba246cf9a8 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -68,7 +68,7 @@ else $service = 'StripeLive'; } -$stripeaccount = $stripe->GetStripeAccount($service); +$stripeaccount = $stripe->getStripeAccount($service); if (empty($stripeaccount)) { print $langs->trans('ErrorStripeAccountNotDefined'); diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 4ea45b7a4b3..a9df01d6acb 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -52,12 +52,12 @@ class Stripe extends CommonObject /** - * GetStripeAccount + * Return stripe account * * @param string $mode 'StripeTest' or 'StripeLive' * @return int ??? */ - public function GetStripeAccount($mode='StripeTest') + public function getStripeAccount($mode='StripeTest') { global $conf; @@ -90,12 +90,12 @@ class Stripe extends CommonObject } /** - * GetStripeCustomerAccount + * getStripeCustomerAccount * * @param int $id ??? * @return int ??? */ - public function GetStripeCustomerAccount($id) + public function getStripeCustomerAccount($id) { global $conf; @@ -122,13 +122,13 @@ class Stripe extends CommonObject /** - * CustomerStripe + * customerStripe * * @param int $id ??? * @param string $key ??? * @return \Stripe\StripeObject|\Stripe\ApiResource */ - public function CustomerStripe($id,$key) + public function customerStripe($id,$key) { global $conf; if (empty($conf->global->STRIPECONNECT_LIVE)) { @@ -186,7 +186,7 @@ class Stripe extends CommonObject } /** - * CreatePaymentStripe + * createPaymentStripe * * @param unknown $amount ??? * @param unknown $currency ??? @@ -197,7 +197,7 @@ class Stripe extends CommonObject * @param unknown $account ??? * @return Stripe */ - public function CreatePaymentStripe($amount, $currency, $origin, $item, $source, $customer, $account) + public function createPaymentStripe($amount, $currency, $origin, $item, $source, $customer, $account) { global $conf; if (empty($conf->global->STRIPECONNECT_LIVE)) { @@ -299,7 +299,7 @@ class Stripe extends CommonObject } elseif ($charge->source->type == 'three_d_secure') { $stripe = new Stripe($this->db); $src = \Stripe\Source::retrieve("" . $charge->source->three_d_secure->card . "", array( - "stripe_account" => $stripe->GetStripeAccount($conf->entity) + "stripe_account" => $stripe->getStripeAccount($conf->entity) )); $return->message = $src->card->brand . " ****" . $src->card->last4; } else { diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 143c34f7530..56d94c36dee 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -62,10 +62,10 @@ if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || emp } else { - $servie = 'StripeLive'; + $service = 'StripeLive'; } -$stripeaccount = $stripe->GetStripeAccount($service); +$stripeaccount = $stripe->getStripeAccount($service); if (empty($stripeaccount)) { print $langs->trans('ErrorStripeAccountNotDefined'); @@ -101,7 +101,7 @@ if (! $rowid && $stripeaccount) { print "\n"; - $stripeaccount = $stripe->GetStripeAccount($conf->entity); + $stripeaccount = $stripe->getStripeAccount($service); $txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeaccount));