Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Get_Wallet_For_Xpub_Service_Result | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * The master public key string (and optional gateway_id) used to find/create the wallet object, and the resulting |
| 4 | * wallet and whether it was newly created or not. |
| 5 | * |
| 6 | * @package brianhenryie/bh-wp-bitcoin-gateway |
| 7 | */ |
| 8 | |
| 9 | namespace BrianHenryIE\WP_Bitcoin_Gateway\API\Services\Results; |
| 10 | |
| 11 | use BrianHenryIE\WP_Bitcoin_Gateway\API\Model\Wallet\Bitcoin_Wallet; |
| 12 | use BrianHenryIE\WP_Bitcoin_Gateway\API\Services\Bitcoin_Wallet_Service; |
| 13 | |
| 14 | /** |
| 15 | * @used-by Bitcoin_Wallet_Service::get_or_save_wallet_for_xpub() |
| 16 | */ |
| 17 | readonly class Get_Wallet_For_Xpub_Service_Result { |
| 18 | |
| 19 | /** |
| 20 | * Constructor |
| 21 | * |
| 22 | * @param string $xpub The master public key we need a wallet for. |
| 23 | * @param ?array{integration:class-string, gateway_id:string} $gateway_details Optional gateway id to associate the wallet with. |
| 24 | * @param Bitcoin_Wallet $wallet The created/found wallet. |
| 25 | * @param bool $is_new Was the wallet new or existing. |
| 26 | */ |
| 27 | public function __construct( |
| 28 | public string $xpub, |
| 29 | public ?array $gateway_details, |
| 30 | public Bitcoin_Wallet $wallet, |
| 31 | public bool $is_new, |
| 32 | ) { |
| 33 | } |
| 34 | } |