Use object instead of stdclass for payment source properties

This commit is contained in:
Emili Castells Guasch 2023-12-11 14:03:39 +01:00
parent 586e9451f6
commit 0e8e4dcaeb
2 changed files with 5 additions and 10 deletions

View file

@ -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;
} }
} }

View file

@ -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(