woocommerce-paypal-payments/modules.local/ppcp-api-client/src/Entity/PatchCollection.php
David Remer 005a55c213 phpcs
2020-04-06 11:16:18 +03:00

32 lines
572 B
PHP

<?php
declare(strict_types=1);
namespace Inpsyde\PayPalCommerce\ApiClient\Entity;
class PatchCollection
{
private $patches;
public function __construct(Patch ...$patches)
{
$this->patches = $patches;
}
/**
* @return Patch[]
*/
public function patches() : array
{
return $this->patches;
}
public function toArray() : array
{
return array_map(
function (Patch $patch) : array {
return $patch->toArray();
},
$this->patches()
);
}
}