Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
| Update_File | |
0.00% |
0 / 4 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_id | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_file | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| get_name | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | // "update_file": { |
| 4 | // "id": "40bb2001-48c3-4633-995a-447aa82b491d", |
| 5 | // "file": "https:\/\/updatestest.bhwp.ie\/wp-content\/uploads\/woocommerce_uploads\/2024\/05\/bh-wp-autologin-urls.2.3.0-alozbb.zip", |
| 6 | // "name": "bh-wp-autologin-urls.2.3.0-alozbb.zip" |
| 7 | // }, |
| 8 | |
| 9 | namespace BrianHenryIE\WP_Plugin_Updater\Integrations\SLSWC\Model; |
| 10 | |
| 11 | class Update_File { |
| 12 | |
| 13 | public function __construct( |
| 14 | protected string $id, |
| 15 | protected string $file, |
| 16 | protected string $name |
| 17 | ) { |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * UUID |
| 22 | */ |
| 23 | public function get_id(): string { |
| 24 | return $this->id; |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Download URL in the woocommerce_uploads directory. |
| 29 | */ |
| 30 | public function get_file(): string { |
| 31 | return $this->file; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Filename alone. I.e. the last part of the URL. |
| 36 | */ |
| 37 | public function get_name(): string { |
| 38 | return $this->name; |
| 39 | } |
| 40 | } |