mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Enforce array elements type for Payments constructor
This commit is contained in:
parent
ff4f3d2bba
commit
5fda97307b
2 changed files with 2 additions and 5 deletions
|
@ -8,10 +8,7 @@ class Payments
|
||||||
{
|
{
|
||||||
private $authorizations;
|
private $authorizations;
|
||||||
|
|
||||||
/**
|
public function __construct(Authorization ...$authorizations)
|
||||||
* @var Authorization[] $authorizations
|
|
||||||
*/
|
|
||||||
public function __construct(array $authorizations)
|
|
||||||
{
|
{
|
||||||
$this->authorizations = $authorizations;
|
$this->authorizations = $authorizations;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ class PaymentsFactory
|
||||||
},
|
},
|
||||||
$data->authorizations
|
$data->authorizations
|
||||||
);
|
);
|
||||||
$payments = new Payments($authorizations);
|
$payments = new Payments(...$authorizations);
|
||||||
return $payments;
|
return $payments;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue