Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
14.29% |
1 / 7 |
|
14.29% |
1 / 7 |
CRAP | |
0.00% |
0 / 1 |
| License | |
14.29% |
1 / 7 |
|
14.29% |
1 / 7 |
37.86 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| is_valid_slug | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| is_exists | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| is_deleted | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_current_version | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_error_message | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_order | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | // "license": { |
| 4 | // "valid_slug": true, |
| 5 | // "exists": true, |
| 6 | // "deleted": false, |
| 7 | // "current_version": null, |
| 8 | // "error_message": null, |
| 9 | // "order": { |
| 10 | // "refunds": null, |
| 11 | // "customer_id": null |
| 12 | // } |
| 13 | // }, |
| 14 | |
| 15 | |
| 16 | namespace BrianHenryIE\WP_Plugin_Updater\Integrations\SLSWC\Model; |
| 17 | |
| 18 | class License { |
| 19 | |
| 20 | public function __construct( |
| 21 | protected bool $valid_slug, |
| 22 | protected bool $exists, |
| 23 | protected bool $deleted, |
| 24 | protected ?string $current_version, |
| 25 | protected ?string $error_message, |
| 26 | protected Order $order |
| 27 | ) { |
| 28 | } |
| 29 | |
| 30 | public function is_valid_slug(): bool { |
| 31 | return $this->valid_slug; |
| 32 | } |
| 33 | |
| 34 | public function is_exists(): bool { |
| 35 | return $this->exists; |
| 36 | } |
| 37 | |
| 38 | public function is_deleted(): bool { |
| 39 | return $this->deleted; |
| 40 | } |
| 41 | |
| 42 | public function get_current_version(): ?string { |
| 43 | return $this->current_version; |
| 44 | } |
| 45 | |
| 46 | public function get_error_message(): ?string { |
| 47 | return $this->error_message; |
| 48 | } |
| 49 | |
| 50 | public function get_order(): Order { |
| 51 | return $this->order; |
| 52 | } |
| 53 | } |