mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 17:51:41 +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
|
@ -34,9 +34,9 @@ class PaymentSource {
|
|||
* PaymentSource constructor.
|
||||
*
|
||||
* @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->properties = $properties;
|
||||
}
|
||||
|
@ -53,9 +53,9 @@ class PaymentSource {
|
|||
/**
|
||||
* Payment source properties.
|
||||
*
|
||||
* @return stdClass
|
||||
* @return object
|
||||
*/
|
||||
public function properties(): stdClass {
|
||||
public function properties(): object {
|
||||
return $this->properties;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,11 +212,6 @@ class RenewalHandler {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Suppress ArgumentTypeCoercion
|
||||
*
|
||||
* @psalm-suppress ArgumentTypeCoercion
|
||||
*/
|
||||
$payment_source = new PaymentSource(
|
||||
'card',
|
||||
(object) array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue