mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Use object instead of stdclass for payment source properties
This commit is contained in:
parent
586e9451f6
commit
0e8e4dcaeb
2 changed files with 5 additions and 10 deletions
|
@ -33,10 +33,10 @@ class PaymentSource {
|
||||||
/**
|
/**
|
||||||
* PaymentSource constructor.
|
* PaymentSource constructor.
|
||||||
*
|
*
|
||||||
* @param string $name Payment source name.
|
* @param string $name Payment source name.
|
||||||
* @param stdClass $properties Payment source properties.
|
* @param object $properties Payment source properties.
|
||||||
*/
|
*/
|
||||||
public function __construct( string $name, stdClass $properties ) {
|
public function __construct( string $name, object $properties ) {
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
$this->properties = $properties;
|
$this->properties = $properties;
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,9 @@ class PaymentSource {
|
||||||
/**
|
/**
|
||||||
* Payment source properties.
|
* Payment source properties.
|
||||||
*
|
*
|
||||||
* @return stdClass
|
* @return object
|
||||||
*/
|
*/
|
||||||
public function properties(): stdClass {
|
public function properties(): object {
|
||||||
return $this->properties;
|
return $this->properties;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,11 +212,6 @@ class RenewalHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Suppress ArgumentTypeCoercion
|
|
||||||
*
|
|
||||||
* @psalm-suppress ArgumentTypeCoercion
|
|
||||||
*/
|
|
||||||
$payment_source = new PaymentSource(
|
$payment_source = new PaymentSource(
|
||||||
'card',
|
'card',
|
||||||
(object) array(
|
(object) array(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue