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 $url; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $description; |
||
38 | |||
39 | /** |
||
40 | * @var bool |
||
41 | */ |
||
42 | protected $private; |
||
43 | |||
44 | /** |
||
45 | * @var bool |
||
46 | */ |
||
47 | protected $fork; |
||
48 | |||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $homepage; |
||
53 | |||
54 | /** |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $language; |
||
58 | |||
59 | /** |
||
60 | * @var int |
||
61 | */ |
||
62 | protected $forks_count; |
||
63 | |||
64 | /** |
||
65 | * @var int |
||
66 | */ |
||
67 | protected $stargazers_count; |
||
68 | |||
69 | /** |
||
70 | * @var int |
||
71 | */ |
||
72 | protected $watchers_count; |
||
73 | |||
74 | /** |
||
75 | * @var int |
||
76 | */ |
||
77 | protected $size; |
||
78 | |||
79 | /** |
||
80 | * @var string |
||
81 | */ |
||
82 | protected $default_branch; |
||
83 | |||
84 | /** |
||
85 | * @var int |
||
86 | */ |
||
87 | protected $open_issues_count; |
||
88 | |||
89 | /** |
||
90 | * @var bool |
||
91 | */ |
||
92 | protected $has_issues; |
||
93 | |||
94 | /** |
||
95 | * @var bool |
||
96 | */ |
||
97 | protected $has_wiki; |
||
98 | |||
99 | /** |
||
100 | * @var bool |
||
101 | */ |
||
102 | protected $has_pages; |
||
103 | |||
104 | /** |
||
105 | * @var bool |
||
106 | */ |
||
107 | protected $has_downloads; |
||
108 | |||
109 | /** |
||
110 | * @var DateTimeInterface |
||
111 | */ |
||
112 | protected $pushed_at; |
||
113 | |||
114 | /** |
||
115 | * @var DateTimeInterface |
||
116 | */ |
||
117 | protected $created_at; |
||
118 | |||
119 | /** |
||
120 | * @var DateTimeInterface |
||
121 | */ |
||
122 | protected $updated_at; |
||
123 | |||
124 | /** |
||
125 | * @var string |
||
126 | */ |
||
127 | 4 | protected $html_url; |
|
128 | |||
129 | 4 | /** |
|
130 | * @var array |
||
131 | */ |
||
132 | //protected $permissions; |
||
133 | |||
134 | /** |
||
135 | 4 | * @return int |
|
136 | */ |
||
137 | 4 | public function id() : int |
|
141 | |||
142 | /** |
||
143 | 4 | * @return string |
|
144 | */ |
||
145 | 4 | public function name() : string |
|
149 | |||
150 | /** |
||
151 | 4 | * @return string |
|
152 | */ |
||
153 | 4 | public function fullName() : string |
|
157 | |||
158 | /** |
||
159 | 4 | * @return string |
|
160 | */ |
||
161 | 4 | public function url() : string |
|
165 | |||
166 | /** |
||
167 | 4 | * @return string |
|
168 | */ |
||
169 | 4 | public function description() : string |
|
173 | |||
174 | /** |
||
175 | 4 | * @return bool |
|
176 | */ |
||
177 | 4 | public function private() : bool |
|
181 | |||
182 | /** |
||
183 | 4 | * @return bool |
|
184 | */ |
||
185 | 4 | public function fork() : bool |
|
189 | |||
190 | /** |
||
191 | 4 | * @return string |
|
192 | */ |
||
193 | 4 | public function homepage() : string |
|
197 | |||
198 | /** |
||
199 | 4 | * @return string |
|
200 | */ |
||
201 | 4 | public function language() : string |
|
205 | |||
206 | /** |
||
207 | 4 | * @return int |
|
208 | */ |
||
209 | 4 | public function forksCount() : int |
|
213 | |||
214 | /** |
||
215 | 4 | * @return int |
|
216 | */ |
||
217 | 4 | public function stargazersCount() : int |
|
221 | |||
222 | /** |
||
223 | 4 | * @return int |
|
224 | */ |
||
225 | 4 | public function watchersCount() : int |
|
229 | |||
230 | /** |
||
231 | 4 | * @return int |
|
232 | */ |
||
233 | 4 | public function size() : int |
|
237 | |||
238 | /** |
||
239 | 4 | * @return string |
|
240 | */ |
||
241 | 4 | public function defaultBranch() : string |
|
245 | |||
246 | /** |
||
247 | 4 | * @return int |
|
248 | */ |
||
249 | 4 | public function openIssuesCount() : int |
|
253 | |||
254 | /** |
||
255 | 4 | * @return bool |
|
256 | */ |
||
257 | 4 | public function hasIssues() : bool |
|
261 | |||
262 | /** |
||
263 | 4 | * @return bool |
|
264 | */ |
||
265 | 4 | public function hasWiki() : bool |
|
269 | |||
270 | /** |
||
271 | * @return bool |
||
272 | */ |
||
273 | public function hasPages() : bool |
||
277 | |||
278 | /** |
||
279 | * @return bool |
||
280 | */ |
||
281 | public function hasDownloads() : bool |
||
285 | |||
286 | /** |
||
287 | * @return DateTimeInterface |
||
288 | */ |
||
289 | public function pushedAt() : DateTimeInterface |
||
293 | |||
294 | /** |
||
295 | * @return DateTimeInterface |
||
296 | */ |
||
297 | public function createdAt() : DateTimeInterface |
||
301 | |||
302 | /** |
||
303 | * @return DateTimeInterface |
||
304 | */ |
||
305 | public function updatedAt() : DateTimeInterface |
||
309 | |||
310 | /** |
||
311 | * @return array |
||
312 | */ |
||
313 | public function permissions() : array |
||
317 | |||
318 | public function labels() |
||
322 | |||
323 | /** |
||
324 | * @return string |
||
325 | */ |
||
326 | public function htmlUrl() : string |
||
330 | } |
||
331 |
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: