Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
25.00% covered (danger)
25.00%
5 / 20
25.00% covered (danger)
25.00%
5 / 20
CRAP
0.00% covered (danger)
0.00%
0 / 1
Release
25.00% covered (danger)
25.00%
5 / 20
25.00% covered (danger)
25.00%
5 / 20
188.75
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 get_url
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_assets_url
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_upload_url
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_html_url
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_id
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_author
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_node_id
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_tag_name
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 get_target_commitish
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_name
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 is_draft
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 is_prerelease
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 get_created_at
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 get_published_at
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_assets
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 get_tarball_url
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_zipball_url
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_body
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get_mentions_count
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * @see https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28
4 *
5 * @package brianhenryie/bh-wp-plugin-updater
6 */
7
8namespace BrianHenryIE\WP_Plugin_Updater\Integrations\GitHub\Model;
9
10class Release {
11
12    /**
13     * @param Assets[] $assets
14     */
15    public function __construct(
16        protected string $url,
17        protected string $assets_url,
18        protected string $upload_url,
19        protected string $html_url,
20        protected int $id,
21        protected User $author,
22        protected string $node_id,
23        protected string $tag_name,
24        protected string $target_commitish,
25        protected string $name,
26        protected bool $draft,
27        protected bool $prerelease,
28        protected string $created_at,
29        protected string $published_at,
30        protected array $assets,
31        protected string $tarball_url,
32        protected string $zipball_url,
33        protected string $body,
34        protected int $mentions_count
35    ) {
36    }
37
38    public function get_url(): string {
39        return $this->url;
40    }
41
42    public function get_assets_url(): string {
43        return $this->assets_url;
44    }
45
46    public function get_upload_url(): string {
47        return $this->upload_url;
48    }
49
50    public function get_html_url(): string {
51        return $this->html_url;
52    }
53
54    public function get_id(): int {
55        return $this->id;
56    }
57
58    public function get_author(): User {
59        return $this->author;
60    }
61
62    public function get_node_id(): string {
63        return $this->node_id;
64    }
65
66    public function get_tag_name(): string {
67        return $this->tag_name;
68    }
69
70    public function get_target_commitish(): string {
71        return $this->target_commitish;
72    }
73
74    public function get_name(): string {
75        return $this->name;
76    }
77
78    public function is_draft(): bool {
79        return $this->draft;
80    }
81
82    public function is_prerelease(): bool {
83        return $this->prerelease;
84    }
85
86    public function get_created_at(): string {
87        return $this->created_at;
88    }
89
90    public function get_published_at(): string {
91        return $this->published_at;
92    }
93
94    /**
95     * @return Assets[]
96     */
97    public function get_assets(): array {
98        return $this->assets;
99    }
100
101    public function get_tarball_url(): string {
102        return $this->tarball_url;
103    }
104
105    public function get_zipball_url(): string {
106        return $this->zipball_url;
107    }
108
109    public function get_body(): string {
110        return $this->body;
111    }
112
113    public function get_mentions_count(): int {
114        return $this->mentions_count;
115    }
116}