Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
14.29% |
2 / 14 |
|
14.29% |
2 / 14 |
CRAP | |
0.00% |
0 / 1 |
| Plugin_Update | |
14.29% |
2 / 14 |
|
14.29% |
2 / 14 |
137.43 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| get_id | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_slug | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_version | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| get_url | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_package | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_tested | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_requires_php | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_autoupdate | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_icons | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_banners | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_banners_rtl | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_translations | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| __serialize | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace BrianHenryIE\WP_Plugin_Updater\Model; |
| 5 | |
| 6 | use BrianHenryIE\WP_Plugin_Updater\Model\Plugin_Update_Interface; |
| 7 | |
| 8 | class Plugin_Update implements Plugin_Update_Interface { |
| 9 | public function __construct( |
| 10 | protected ?string $id, |
| 11 | protected string $slug, |
| 12 | protected string $version, |
| 13 | protected string $url, |
| 14 | protected string $package, |
| 15 | protected ?string $tested, |
| 16 | protected ?string $requires_php, |
| 17 | protected ?bool $autoupdate, |
| 18 | protected ?array $icons, |
| 19 | protected ?array $banners, |
| 20 | protected ?array $banners_rtl, |
| 21 | protected ?array $translations, |
| 22 | ) { |
| 23 | } |
| 24 | |
| 25 | public function get_id(): ?string { |
| 26 | return $this->id; |
| 27 | } |
| 28 | |
| 29 | public function get_slug(): string { |
| 30 | return $this->slug; |
| 31 | } |
| 32 | |
| 33 | public function get_version(): string { |
| 34 | return $this->version; |
| 35 | } |
| 36 | |
| 37 | public function get_url(): string { |
| 38 | return $this->url; |
| 39 | } |
| 40 | |
| 41 | public function get_package(): string { |
| 42 | return $this->package; |
| 43 | } |
| 44 | |
| 45 | public function get_tested(): ?string { |
| 46 | return $this->tested; |
| 47 | } |
| 48 | |
| 49 | public function get_requires_php(): ?string { |
| 50 | return $this->requires_php; |
| 51 | } |
| 52 | |
| 53 | public function get_autoupdate(): ?bool { |
| 54 | return $this->autoupdate; |
| 55 | } |
| 56 | |
| 57 | public function get_icons(): ?array { |
| 58 | return $this->icons; |
| 59 | } |
| 60 | |
| 61 | public function get_banners(): ?array { |
| 62 | return $this->banners; |
| 63 | } |
| 64 | |
| 65 | public function get_banners_rtl(): ?array { |
| 66 | return $this->banners_rtl; |
| 67 | } |
| 68 | |
| 69 | public function get_translations(): ?array { |
| 70 | return $this->translations; |
| 71 | } |
| 72 | |
| 73 | |
| 74 | /** |
| 75 | * Serialize the object to an array. |
| 76 | * |
| 77 | * @used-by serialize() |
| 78 | */ |
| 79 | public function __serialize(): array { |
| 80 | return get_object_vars( $this ); |
| 81 | } |
| 82 | } |