Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
4.26% |
2 / 47 |
|
4.26% |
2 / 47 |
CRAP | |
0.00% |
0 / 1 |
| Plugin_Info | |
4.26% |
2 / 47 |
|
4.26% |
2 / 47 |
1985.83 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| get_sections | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_name | |
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_author | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_author_profile | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_contributors | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_requires | |
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_requires_plugins | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_compatibility | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_rating | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_ratings | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_num_ratings | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_support_url | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_support_threads | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_support_threads_resolved | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_active_installs | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_downloaded | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_last_updated | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_added | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_homepage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_short_description | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_description | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_download_link | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_upgrade_notice | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_screenshots | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_tags | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_stable_tag | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_versions | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_business_model | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_repository_url | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_commercial_support_url | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_donate_link | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_banners | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_icons | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_blocks | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_block_assets | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_author_block_count | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_author_block_rating | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_blueprints | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_preview_link | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_language_packs | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_block_translations | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| __serialize | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace BrianHenryIE\WP_Plugin_Updater\Model; |
| 4 | |
| 5 | class Plugin_Info implements Plugin_Info_Interface { |
| 6 | |
| 7 | public function __construct( |
| 8 | protected array $sections, |
| 9 | protected string $name, |
| 10 | protected string $slug, |
| 11 | protected string $version, |
| 12 | protected string $author, |
| 13 | protected string $author_profile, |
| 14 | protected array $contributors, |
| 15 | protected ?string $requires, |
| 16 | protected ?string $tested, |
| 17 | protected ?string $requires_php, |
| 18 | protected array $requires_plugins, |
| 19 | protected array $compatibility, |
| 20 | protected int $rating, |
| 21 | protected array $ratings, |
| 22 | protected int $num_ratings, |
| 23 | protected string $support_url, |
| 24 | protected int $support_threads, |
| 25 | protected int $support_threads_resolved, |
| 26 | protected int $active_installs, |
| 27 | protected int $downloaded, |
| 28 | protected string $last_updated, |
| 29 | protected string $added, |
| 30 | protected string $homepage, |
| 31 | protected string $short_description, |
| 32 | protected string $description, |
| 33 | protected string $download_link, |
| 34 | protected string $upgrade_notice, |
| 35 | protected array $screenshots, |
| 36 | protected array $tags, |
| 37 | protected string $stable_tag, |
| 38 | protected array $versions, |
| 39 | protected ?string $business_model, |
| 40 | protected string $repository_url, |
| 41 | protected string $commercial_support_url, |
| 42 | protected string $donate_link, |
| 43 | protected array $banners, |
| 44 | protected array $icons, |
| 45 | protected array $blocks, |
| 46 | protected array $block_assets, |
| 47 | protected int $author_block_count, |
| 48 | protected int $author_block_rating, |
| 49 | protected array $blueprints, |
| 50 | protected array $preview_link, |
| 51 | protected array $language_packs, |
| 52 | protected array $block_translations, |
| 53 | ) { |
| 54 | } |
| 55 | |
| 56 | public function get_sections(): array { |
| 57 | return $this->sections; |
| 58 | } |
| 59 | |
| 60 | public function get_name(): string { |
| 61 | return $this->name; |
| 62 | } |
| 63 | |
| 64 | public function get_slug(): string { |
| 65 | return $this->slug; |
| 66 | } |
| 67 | |
| 68 | public function get_version(): string { |
| 69 | return $this->version; |
| 70 | } |
| 71 | |
| 72 | public function get_author(): string { |
| 73 | return $this->author; |
| 74 | } |
| 75 | |
| 76 | public function get_author_profile(): string { |
| 77 | return $this->author_profile; |
| 78 | } |
| 79 | |
| 80 | public function get_contributors(): array { |
| 81 | return $this->contributors; |
| 82 | } |
| 83 | |
| 84 | public function get_requires(): ?string { |
| 85 | return $this->requires; |
| 86 | } |
| 87 | |
| 88 | public function get_tested(): ?string { |
| 89 | return $this->tested; |
| 90 | } |
| 91 | |
| 92 | public function get_requires_php(): ?string { |
| 93 | return $this->requires_php; |
| 94 | } |
| 95 | |
| 96 | public function get_requires_plugins(): array { |
| 97 | return $this->requires_plugins; |
| 98 | } |
| 99 | |
| 100 | public function get_compatibility(): array { |
| 101 | return $this->compatibility; |
| 102 | } |
| 103 | |
| 104 | public function get_rating(): int { |
| 105 | return $this->rating; |
| 106 | } |
| 107 | |
| 108 | public function get_ratings(): array { |
| 109 | return $this->ratings; |
| 110 | } |
| 111 | |
| 112 | public function get_num_ratings(): int { |
| 113 | return $this->num_ratings; |
| 114 | } |
| 115 | |
| 116 | public function get_support_url(): string { |
| 117 | return $this->support_url; |
| 118 | } |
| 119 | |
| 120 | public function get_support_threads(): int { |
| 121 | return $this->support_threads; |
| 122 | } |
| 123 | |
| 124 | public function get_support_threads_resolved(): int { |
| 125 | return $this->support_threads_resolved; |
| 126 | } |
| 127 | |
| 128 | public function get_active_installs(): int { |
| 129 | return $this->active_installs; |
| 130 | } |
| 131 | |
| 132 | public function get_downloaded(): int { |
| 133 | return $this->downloaded; |
| 134 | } |
| 135 | |
| 136 | public function get_last_updated(): string { |
| 137 | return $this->last_updated; |
| 138 | } |
| 139 | |
| 140 | public function get_added(): string { |
| 141 | return $this->added; |
| 142 | } |
| 143 | |
| 144 | public function get_homepage(): string { |
| 145 | return $this->homepage; |
| 146 | } |
| 147 | |
| 148 | public function get_short_description(): string { |
| 149 | return $this->short_description; |
| 150 | } |
| 151 | |
| 152 | public function get_description(): string { |
| 153 | return $this->description; |
| 154 | } |
| 155 | |
| 156 | public function get_download_link(): string { |
| 157 | return $this->download_link; |
| 158 | } |
| 159 | |
| 160 | public function get_upgrade_notice(): string { |
| 161 | return $this->upgrade_notice; |
| 162 | } |
| 163 | |
| 164 | public function get_screenshots(): array { |
| 165 | return $this->screenshots; |
| 166 | } |
| 167 | |
| 168 | public function get_tags(): array { |
| 169 | return $this->tags; |
| 170 | } |
| 171 | |
| 172 | public function get_stable_tag(): string { |
| 173 | return $this->stable_tag; |
| 174 | } |
| 175 | |
| 176 | public function get_versions(): array { |
| 177 | return $this->versions; |
| 178 | } |
| 179 | |
| 180 | public function get_business_model(): ?string { |
| 181 | return $this->business_model; |
| 182 | } |
| 183 | |
| 184 | public function get_repository_url(): string { |
| 185 | return $this->repository_url; |
| 186 | } |
| 187 | |
| 188 | public function get_commercial_support_url(): string { |
| 189 | return $this->commercial_support_url; |
| 190 | } |
| 191 | |
| 192 | public function get_donate_link(): string { |
| 193 | return $this->donate_link; |
| 194 | } |
| 195 | |
| 196 | public function get_banners(): array { |
| 197 | return $this->banners; |
| 198 | } |
| 199 | |
| 200 | public function get_icons(): array { |
| 201 | return $this->icons; |
| 202 | } |
| 203 | |
| 204 | public function get_blocks(): array { |
| 205 | return $this->blocks; |
| 206 | } |
| 207 | |
| 208 | public function get_block_assets(): array { |
| 209 | return $this->block_assets; |
| 210 | } |
| 211 | |
| 212 | public function get_author_block_count(): int { |
| 213 | return $this->author_block_count; |
| 214 | } |
| 215 | |
| 216 | public function get_author_block_rating(): int { |
| 217 | return $this->author_block_rating; |
| 218 | } |
| 219 | |
| 220 | public function get_blueprints(): array { |
| 221 | return $this->blueprints; |
| 222 | } |
| 223 | |
| 224 | public function get_preview_link(): array { |
| 225 | return $this->preview_link; |
| 226 | } |
| 227 | |
| 228 | public function get_language_packs(): array { |
| 229 | return $this->language_packs; |
| 230 | } |
| 231 | |
| 232 | public function get_block_translations(): array { |
| 233 | return $this->block_translations; |
| 234 | } |
| 235 | |
| 236 | /** |
| 237 | * Serialize the object to an array. |
| 238 | * |
| 239 | * @used-by serialize() |
| 240 | */ |
| 241 | public function __serialize(): array { |
| 242 | return get_object_vars( $this ); |
| 243 | } |
| 244 | } |