1 | <?php declare(strict_types=1); |
||
12 | abstract class Repository extends AbstractResource implements RepositoryInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | protected $id; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $name; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $full_name; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $description; |
||
33 | |||
34 | /** |
||
35 | * @var bool |
||
36 | */ |
||
37 | protected $private; |
||
38 | |||
39 | /** |
||
40 | * @var bool |
||
41 | */ |
||
42 | protected $fork; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $homepage; |
||
48 | |||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $language; |
||
53 | |||
54 | /** |
||
55 | * @var int |
||
56 | */ |
||
57 | protected $forks_count; |
||
58 | |||
59 | /** |
||
60 | * @var int |
||
61 | */ |
||
62 | protected $stargazers_count; |
||
63 | |||
64 | /** |
||
65 | * @var int |
||
66 | */ |
||
67 | protected $watchers_count; |
||
68 | |||
69 | /** |
||
70 | * @var int |
||
71 | */ |
||
72 | protected $size; |
||
73 | |||
74 | /** |
||
75 | * @var string |
||
76 | */ |
||
77 | protected $default_branch; |
||
78 | |||
79 | /** |
||
80 | * @var int |
||
81 | */ |
||
82 | protected $open_issues_count; |
||
83 | |||
84 | /** |
||
85 | * @var bool |
||
86 | */ |
||
87 | protected $has_issues; |
||
88 | |||
89 | /** |
||
90 | * @var bool |
||
91 | */ |
||
92 | protected $has_wiki; |
||
93 | |||
94 | /** |
||
95 | * @var bool |
||
96 | */ |
||
97 | protected $has_pages; |
||
98 | |||
99 | /** |
||
100 | * @var bool |
||
101 | */ |
||
102 | protected $has_downloads; |
||
103 | |||
104 | /** |
||
105 | * @var DateTimeInterface |
||
106 | */ |
||
107 | protected $pushed_at; |
||
108 | |||
109 | /** |
||
110 | * @var DateTimeInterface |
||
111 | */ |
||
112 | protected $created_at; |
||
113 | |||
114 | /** |
||
115 | * @var DateTimeInterface |
||
116 | */ |
||
117 | protected $updated_at; |
||
118 | |||
119 | /** |
||
120 | * @var string |
||
121 | */ |
||
122 | protected $html_url; |
||
123 | |||
124 | /** |
||
125 | * @var array |
||
126 | */ |
||
127 | 4 | //protected $permissions; |
|
128 | |||
129 | 4 | /** |
|
130 | * @return int |
||
131 | */ |
||
132 | public function id() : int |
||
136 | |||
137 | 4 | /** |
|
138 | * @return string |
||
139 | */ |
||
140 | public function name() : string |
||
144 | |||
145 | 4 | /** |
|
146 | * @return string |
||
147 | */ |
||
148 | public function fullName() : string |
||
152 | |||
153 | 4 | /** |
|
154 | * @return string |
||
155 | */ |
||
156 | public function description() : string |
||
160 | |||
161 | 4 | /** |
|
162 | * @return bool |
||
163 | */ |
||
164 | public function private() : bool |
||
168 | |||
169 | 4 | /** |
|
170 | * @return bool |
||
171 | */ |
||
172 | public function fork() : bool |
||
176 | |||
177 | 4 | /** |
|
178 | * @return string |
||
179 | */ |
||
180 | public function homepage() : string |
||
184 | |||
185 | 4 | /** |
|
186 | * @return string |
||
187 | */ |
||
188 | public function language() : string |
||
192 | |||
193 | 4 | /** |
|
194 | * @return int |
||
195 | */ |
||
196 | public function forksCount() : int |
||
200 | |||
201 | 4 | /** |
|
202 | * @return int |
||
203 | */ |
||
204 | public function stargazersCount() : int |
||
208 | |||
209 | 4 | /** |
|
210 | * @return int |
||
211 | */ |
||
212 | public function watchersCount() : int |
||
216 | |||
217 | 4 | /** |
|
218 | * @return int |
||
219 | */ |
||
220 | public function size() : int |
||
224 | |||
225 | 4 | /** |
|
226 | * @return string |
||
227 | */ |
||
228 | public function defaultBranch() : string |
||
232 | |||
233 | 4 | /** |
|
234 | * @return int |
||
235 | */ |
||
236 | public function openIssuesCount() : int |
||
240 | |||
241 | 4 | /** |
|
242 | * @return bool |
||
243 | */ |
||
244 | public function hasIssues() : bool |
||
248 | |||
249 | 4 | /** |
|
250 | * @return bool |
||
251 | */ |
||
252 | public function hasWiki() : bool |
||
256 | |||
257 | 4 | /** |
|
258 | * @return bool |
||
259 | */ |
||
260 | public function hasPages() : bool |
||
264 | |||
265 | 4 | /** |
|
266 | * @return bool |
||
267 | */ |
||
268 | public function hasDownloads() : bool |
||
272 | |||
273 | /** |
||
274 | * @return DateTimeInterface |
||
275 | */ |
||
276 | public function pushedAt() : DateTimeInterface |
||
280 | |||
281 | /** |
||
282 | * @return DateTimeInterface |
||
283 | */ |
||
284 | public function createdAt() : DateTimeInterface |
||
288 | |||
289 | /** |
||
290 | * @return DateTimeInterface |
||
291 | */ |
||
292 | public function updatedAt() : DateTimeInterface |
||
296 | |||
297 | /** |
||
298 | * @return array |
||
299 | */ |
||
300 | public function permissions() : array |
||
304 | |||
305 | public function labels() |
||
309 | |||
310 | /** |
||
311 | * @return string |
||
312 | */ |
||
313 | public function htmlUrl() : string |
||
317 | } |
||
318 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: