Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 68 |
|
0.00% |
0 / 66 |
CRAP | |
0.00% |
0 / 1 |
| Product | |
0.00% |
0 / 68 |
|
0.00% |
0 / 66 |
4422 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_software | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_software_type | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_allow_staging | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_renewal_period | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_software_slug | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_version | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_author | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_required_wp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_compatible_to | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_updated | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_activations | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_staging_activations | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_description | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_change_log | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_installation | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_documentation_link | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_banner_low | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_banner_high | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_update_file_id | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_update_file_url | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_update_file_name | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_update_file | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| is_thumbnail | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_sections | |
0.00% |
0 / 3 |
|
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_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_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 | |||
| 1 | <?php |
| 2 | |
| 3 | // "product": { |
| 4 | // "software": 1, |
| 5 | // "software_type": "plugin", |
| 6 | // "allow_staging": "yes", |
| 7 | // "renewal_period": "annual", |
| 8 | // "software_slug": "a-plugin", |
| 9 | // "version": "", |
| 10 | // "author": "", |
| 11 | // "required_wp": "", |
| 12 | // "compatible_to": "", |
| 13 | // "updated": "", |
| 14 | // "activations": "1", |
| 15 | // "staging_activations": "3", |
| 16 | // "description": "", |
| 17 | // "change_log": "", |
| 18 | // "installation": "", |
| 19 | // "documentation_link": "", |
| 20 | // "banner_low": "", |
| 21 | // "banner_high": "", |
| 22 | // "update_file_id": "40bb2001-48c3-4633-995a-447aa82b491d", |
| 23 | // "update_file_url": "https:\/\/updatestest.bhwp.ie\/wp-content\/uploads\/woocommerce_uploads\/2024\/05\/bh-wp-autologin-urls.2.3.0-alozbb.zip", |
| 24 | // "update_file_name": "bh-wp-autologin-urls.2.3.0-alozbb.zip", |
| 25 | // "update_file": { |
| 26 | // "id": "40bb2001-48c3-4633-995a-447aa82b491d", |
| 27 | // "file": "https:\/\/updatestest.bhwp.ie\/wp-content\/uploads\/woocommerce_uploads\/2024\/05\/bh-wp-autologin-urls.2.3.0-alozbb.zip", |
| 28 | // "name": "bh-wp-autologin-urls.2.3.0-alozbb.zip" |
| 29 | // }, |
| 30 | // "thumbnail": false |
| 31 | // } |
| 32 | |
| 33 | namespace BrianHenryIE\WP_Plugin_Updater\Integrations\SLSWC\Model; |
| 34 | |
| 35 | use BrianHenryIE\WP_Plugin_Updater\Model\Plugin_Info_Interface; |
| 36 | |
| 37 | class Product implements Plugin_Info_Interface { |
| 38 | |
| 39 | public function __construct( |
| 40 | protected int $software, |
| 41 | protected string $software_type, |
| 42 | protected string $allow_staging, |
| 43 | protected string $renewal_period, |
| 44 | protected string $software_slug, |
| 45 | protected string $version, |
| 46 | protected string $author, |
| 47 | protected string $required_wp, |
| 48 | protected string $compatible_to, |
| 49 | protected string $updated, |
| 50 | protected string $activations, |
| 51 | protected string $staging_activations, |
| 52 | protected string $description, |
| 53 | protected string $change_log, |
| 54 | protected string $installation, |
| 55 | protected string $documentation_link, |
| 56 | protected string $banner_low, |
| 57 | protected string $banner_high, |
| 58 | protected string $update_file_id, |
| 59 | protected string $update_file_url, |
| 60 | protected string $update_file_name, |
| 61 | protected Update_File $update_file, |
| 62 | protected bool $thumbnail // TODO: this looks wrong. |
| 63 | ) { |
| 64 | } |
| 65 | |
| 66 | public function get_software(): int { |
| 67 | return $this->software; |
| 68 | } |
| 69 | |
| 70 | public function get_software_type(): string { |
| 71 | return $this->software_type; |
| 72 | } |
| 73 | |
| 74 | public function get_allow_staging(): string { |
| 75 | return $this->allow_staging; |
| 76 | } |
| 77 | |
| 78 | public function get_renewal_period(): string { |
| 79 | return $this->renewal_period; |
| 80 | } |
| 81 | |
| 82 | public function get_software_slug(): string { |
| 83 | return $this->software_slug; |
| 84 | } |
| 85 | |
| 86 | public function get_version(): string { |
| 87 | return $this->version; |
| 88 | } |
| 89 | |
| 90 | public function get_author(): string { |
| 91 | return $this->author; |
| 92 | } |
| 93 | |
| 94 | public function get_required_wp(): string { |
| 95 | return $this->required_wp; |
| 96 | } |
| 97 | |
| 98 | public function get_compatible_to(): string { |
| 99 | return $this->compatible_to; |
| 100 | } |
| 101 | |
| 102 | public function get_updated(): string { |
| 103 | return $this->updated; |
| 104 | } |
| 105 | |
| 106 | public function get_activations(): string { |
| 107 | return $this->activations; |
| 108 | } |
| 109 | |
| 110 | public function get_staging_activations(): string { |
| 111 | return $this->staging_activations; |
| 112 | } |
| 113 | |
| 114 | public function get_description(): string { |
| 115 | return $this->description; |
| 116 | } |
| 117 | |
| 118 | public function get_change_log(): string { |
| 119 | return $this->change_log; |
| 120 | } |
| 121 | |
| 122 | public function get_installation(): string { |
| 123 | return $this->installation; |
| 124 | } |
| 125 | |
| 126 | public function get_documentation_link(): string { |
| 127 | return $this->documentation_link; |
| 128 | } |
| 129 | |
| 130 | public function get_banner_low(): string { |
| 131 | return $this->banner_low; |
| 132 | } |
| 133 | |
| 134 | public function get_banner_high(): string { |
| 135 | return $this->banner_high; |
| 136 | } |
| 137 | |
| 138 | public function get_update_file_id(): string { |
| 139 | return $this->update_file_id; |
| 140 | } |
| 141 | |
| 142 | public function get_update_file_url(): ?string { |
| 143 | return $this->update_file_url; |
| 144 | } |
| 145 | |
| 146 | public function get_update_file_name(): string { |
| 147 | return $this->update_file_name; |
| 148 | } |
| 149 | |
| 150 | public function get_update_file(): Update_File { |
| 151 | return $this->update_file; |
| 152 | } |
| 153 | |
| 154 | public function is_thumbnail(): bool { |
| 155 | return $this->thumbnail; |
| 156 | } |
| 157 | |
| 158 | public function get_sections(): array { |
| 159 | return array( |
| 160 | 'changelog' => $this->get_change_log(), |
| 161 | ); |
| 162 | } |
| 163 | |
| 164 | public function get_name(): string { |
| 165 | throw new \Exception( 'not implemented' ); |
| 166 | } |
| 167 | |
| 168 | public function get_slug(): string { |
| 169 | throw new \Exception( 'not implemented' ); |
| 170 | } |
| 171 | |
| 172 | public function get_author_profile(): string { |
| 173 | throw new \Exception( 'not implemented' ); |
| 174 | } |
| 175 | |
| 176 | public function get_contributors(): array { |
| 177 | throw new \Exception( 'not implemented' ); |
| 178 | } |
| 179 | |
| 180 | public function get_requires(): string { |
| 181 | throw new \Exception( 'not implemented' ); |
| 182 | } |
| 183 | |
| 184 | public function get_tested(): string { |
| 185 | throw new \Exception( 'not implemented' ); |
| 186 | } |
| 187 | |
| 188 | public function get_requires_php(): string { |
| 189 | throw new \Exception( 'not implemented' ); |
| 190 | } |
| 191 | |
| 192 | public function get_requires_plugins(): array { |
| 193 | throw new \Exception( 'not implemented' ); |
| 194 | } |
| 195 | |
| 196 | public function get_compatibility(): array { |
| 197 | throw new \Exception( 'not implemented' ); |
| 198 | } |
| 199 | |
| 200 | public function get_rating(): int { |
| 201 | throw new \Exception( 'not implemented' ); |
| 202 | } |
| 203 | |
| 204 | public function get_ratings(): array { |
| 205 | throw new \Exception( 'not implemented' ); |
| 206 | } |
| 207 | |
| 208 | public function get_num_ratings(): int { |
| 209 | throw new \Exception( 'not implemented' ); |
| 210 | } |
| 211 | |
| 212 | public function get_support_url(): string { |
| 213 | throw new \Exception( 'not implemented' ); |
| 214 | } |
| 215 | |
| 216 | public function get_support_threads(): int { |
| 217 | throw new \Exception( 'not implemented' ); |
| 218 | } |
| 219 | |
| 220 | public function get_support_threads_resolved(): int { |
| 221 | throw new \Exception( 'not implemented' ); |
| 222 | } |
| 223 | |
| 224 | public function get_active_installs(): int { |
| 225 | throw new \Exception( 'not implemented' ); |
| 226 | } |
| 227 | |
| 228 | public function get_downloaded(): int { |
| 229 | throw new \Exception( 'not implemented' ); |
| 230 | } |
| 231 | |
| 232 | public function get_last_updated(): string { |
| 233 | throw new \Exception( 'not implemented' ); |
| 234 | } |
| 235 | |
| 236 | public function get_added(): string { |
| 237 | throw new \Exception( 'not implemented' ); |
| 238 | } |
| 239 | |
| 240 | public function get_homepage(): string { |
| 241 | throw new \Exception( 'not implemented' ); |
| 242 | } |
| 243 | |
| 244 | public function get_short_description(): string { |
| 245 | throw new \Exception( 'not implemented' ); |
| 246 | } |
| 247 | |
| 248 | public function get_download_link(): string { |
| 249 | throw new \Exception( 'not implemented' ); |
| 250 | } |
| 251 | |
| 252 | public function get_upgrade_notice(): string { |
| 253 | throw new \Exception( 'not implemented' ); |
| 254 | } |
| 255 | |
| 256 | public function get_screenshots(): array { |
| 257 | throw new \Exception( 'not implemented' ); |
| 258 | } |
| 259 | |
| 260 | public function get_tags(): array { |
| 261 | throw new \Exception( 'not implemented' ); |
| 262 | } |
| 263 | |
| 264 | public function get_stable_tag(): string { |
| 265 | throw new \Exception( 'not implemented' ); |
| 266 | } |
| 267 | |
| 268 | public function get_versions(): array { |
| 269 | throw new \Exception( 'not implemented' ); |
| 270 | } |
| 271 | |
| 272 | public function get_business_model(): ?string { |
| 273 | throw new \Exception( 'not implemented' ); |
| 274 | } |
| 275 | |
| 276 | public function get_repository_url(): string { |
| 277 | throw new \Exception( 'not implemented' ); |
| 278 | } |
| 279 | |
| 280 | public function get_commercial_support_url(): string { |
| 281 | throw new \Exception( 'not implemented' ); |
| 282 | } |
| 283 | |
| 284 | public function get_donate_link(): string { |
| 285 | throw new \Exception( 'not implemented' ); |
| 286 | } |
| 287 | |
| 288 | public function get_banners(): array { |
| 289 | throw new \Exception( 'not implemented' ); |
| 290 | } |
| 291 | |
| 292 | public function get_icons(): array { |
| 293 | throw new \Exception( 'not implemented' ); |
| 294 | } |
| 295 | |
| 296 | public function get_blocks(): array { |
| 297 | throw new \Exception( 'not implemented' ); |
| 298 | } |
| 299 | |
| 300 | public function get_block_assets(): array { |
| 301 | throw new \Exception( 'not implemented' ); |
| 302 | } |
| 303 | |
| 304 | public function get_author_block_count(): int { |
| 305 | throw new \Exception( 'not implemented' ); |
| 306 | } |
| 307 | |
| 308 | public function get_author_block_rating(): int { |
| 309 | throw new \Exception( 'not implemented' ); |
| 310 | } |
| 311 | |
| 312 | public function get_blueprints(): array { |
| 313 | throw new \Exception( 'not implemented' ); |
| 314 | } |
| 315 | |
| 316 | public function get_preview_link(): array { |
| 317 | throw new \Exception( 'not implemented' ); |
| 318 | } |
| 319 | |
| 320 | public function get_language_packs(): array { |
| 321 | throw new \Exception( 'not implemented' ); |
| 322 | } |
| 323 | |
| 324 | public function get_block_translations(): array { |
| 325 | throw new \Exception( 'not implemented' ); |
| 326 | } |
| 327 | } |