Skip to content
Snippets Groups Projects
Commit 78b4a5d1 authored by mattwire's avatar mattwire
Browse files

Add some typing of function arguments

parent 75ef76e1
Branches
Tags
1 merge request!217Implement Stripe Checkout (with support for SEPA and ACH)
......@@ -740,12 +740,12 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
}
/**
* @param \Civi\Payment\PropertyBag $params
* @param \Civi\Payment\PropertyBag $propertyBag
*
* @return bool
*/
private function isPaymentForEventAdditionalParticipants($params) {
if ($params->getter('additional_participants', TRUE)) {
private function isPaymentForEventAdditionalParticipants(\Civi\Payment\PropertyBag $propertyBag): bool {
if ($propertyBag->getter('additional_participants', TRUE)) {
return TRUE;
}
return FALSE;
......
......@@ -83,11 +83,11 @@ class CRM_Stripe_Customer {
/**
* Add a new Stripe customer to the CiviCRM database
*
* @param $params
* @param array $params
*
* @throws \Civi\Payment\Exception\PaymentProcessorException
*/
public static function add($params) {
public static function add(array $params) {
return civicrm_api4('StripeCustomer', 'create', ['checkPermissions' => FALSE, 'values' => $params]);
}
......@@ -136,7 +136,7 @@ class CRM_Stripe_Customer {
*
* @throws \Civi\Payment\Exception\PaymentProcessorException
*/
public static function delete($params) {
public static function delete(array $params) {
$requiredParams = ['processor_id'];
foreach ($requiredParams as $required) {
if (empty($params[$required])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment