1 | <?php |
||
10 | class GithubRepoSource implements GithubRepo, GithubRepoPermissonsInterface |
||
11 | { |
||
12 | /** @var GithubRepoId */ |
||
13 | private $id; |
||
14 | /** @var GithubRepoOwner */ |
||
15 | private $owner; |
||
16 | /** @var GithubRepoName */ |
||
17 | private $name; |
||
18 | /** @var GithubRepoFullName */ |
||
19 | private $fullName; |
||
20 | /** @var string */ |
||
21 | private $htmlUrl; |
||
22 | /** @var string */ |
||
23 | private $description; |
||
24 | /** @var bool */ |
||
25 | private $fork; |
||
26 | /** @var string */ |
||
27 | private $defaultBranchName; |
||
28 | /** @var bool */ |
||
29 | private $private; |
||
30 | /** @var GithubRepoGitUrl */ |
||
31 | private $gitUrl; |
||
32 | /** @var GithubRepoSshUrl */ |
||
33 | private $sshUrl; |
||
34 | /** @var GithubRepoPermissions */ |
||
35 | private $permissions; |
||
36 | /** @var GithubRepoCreatedAt */ |
||
37 | private $githubCreatedAt; |
||
38 | /** @var GithubRepoUpdatedAt */ |
||
39 | private $githubUpdatedAt; |
||
40 | /** @var GithubRepoPushedAt */ |
||
41 | private $githubPushedAt; |
||
42 | |||
43 | /** |
||
44 | * GithubRepoSource constructor. |
||
45 | * |
||
46 | * |
||
47 | * @SuppressWarnings(PHPMD.ExcessiveParameterList) |
||
48 | * |
||
49 | * @param GithubRepoId $id |
||
50 | * @param GithubRepoOwner $owner |
||
51 | * @param GithubRepoName $name |
||
52 | * @param GithubRepoFullName $fullName |
||
53 | * @param $htmlUrl |
||
54 | * @param $description |
||
55 | * @param bool $fork |
||
56 | * @param $defaultBranchName |
||
57 | * @param bool $private |
||
58 | * @param GithubRepoGitUrl $gitUrl |
||
59 | * @param GithubRepoSshUrl $sshUrl |
||
60 | * @param GithubRepoPermissions $permissions |
||
61 | * @param GithubRepoCreatedAt $githubCreatedAt |
||
62 | * @param GithubRepoUpdatedAt $githubUpdatedAt |
||
63 | * @param GithubRepoPushedAt $githubPushedAt |
||
64 | */ |
||
65 | public function __construct( |
||
66 | GithubRepoId $id, |
||
67 | GithubRepoOwner $owner, |
||
68 | GithubRepoName $name, |
||
69 | GithubRepoFullName $fullName, |
||
70 | string $htmlUrl, |
||
71 | string $description, |
||
72 | bool $fork, |
||
73 | string $defaultBranchName, |
||
74 | bool $private, |
||
75 | GithubRepoGitUrl $gitUrl, |
||
76 | GithubRepoSshUrl $sshUrl, |
||
77 | GithubRepoPermissions $permissions = null, |
||
78 | GithubRepoCreatedAt $githubCreatedAt, |
||
79 | GithubRepoUpdatedAt $githubUpdatedAt, |
||
80 | GithubRepoPushedAt $githubPushedAt |
||
81 | ) { |
||
82 | $this->id = $id; |
||
83 | $this->owner = $owner; |
||
84 | $this->name = $name; |
||
85 | $this->fullName = $fullName; |
||
86 | $this->htmlUrl = $htmlUrl; |
||
87 | $this->description = $description; |
||
88 | $this->fork = $fork; |
||
89 | $this->defaultBranchName = $defaultBranchName; |
||
90 | $this->private = $private; |
||
91 | $this->gitUrl = $gitUrl; |
||
92 | $this->sshUrl = $sshUrl; |
||
93 | $this->permissions = $permissions; |
||
94 | $this->githubCreatedAt = $githubCreatedAt; |
||
95 | $this->githubUpdatedAt = $githubUpdatedAt; |
||
96 | $this->githubPushedAt = $githubPushedAt; |
||
97 | } |
||
98 | |||
99 | /** |
||
100 | * @return GithubRepoId |
||
101 | */ |
||
102 | public function getId() : GithubRepoId |
||
106 | |||
107 | /** |
||
108 | * @return GithubUserId |
||
109 | */ |
||
110 | public function getOwnerUserId() : GithubUserId |
||
114 | |||
115 | /** |
||
116 | * @return GithubRepoOwner |
||
117 | */ |
||
118 | public function getOwner() : GithubRepoOwner |
||
122 | |||
123 | /** |
||
124 | * @return GithubRepoName |
||
125 | */ |
||
126 | public function getName() : GithubRepoName |
||
130 | |||
131 | /** |
||
132 | * @return GithubRepoFullName |
||
133 | */ |
||
134 | public function getFullName() : GithubRepoFullName |
||
138 | |||
139 | /** |
||
140 | * @return string |
||
141 | */ |
||
142 | public function getHtmlUrl() : string |
||
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | public function getDescription() : string |
||
154 | |||
155 | /** |
||
156 | * @return bool |
||
157 | */ |
||
158 | public function isFork() : bool |
||
162 | |||
163 | /** |
||
164 | * @return string |
||
165 | */ |
||
166 | public function getDefaultBranchName() : string |
||
170 | |||
171 | /** |
||
172 | * @return bool |
||
173 | */ |
||
174 | public function isPrivate() : bool |
||
178 | |||
179 | /** |
||
180 | * @return GithubRepoGitUrl |
||
181 | */ |
||
182 | public function getGitUrl() : GithubRepoGitUrl |
||
186 | |||
187 | /** |
||
188 | * @return GithubRepoSshUrl |
||
189 | */ |
||
190 | public function getSshUrl() : GithubRepoSshUrl |
||
194 | |||
195 | /** |
||
196 | * @return bool |
||
197 | */ |
||
198 | public function isAdmin() : bool |
||
202 | |||
203 | /** |
||
204 | * @return bool |
||
205 | */ |
||
206 | public function isPushAllowed() : bool |
||
210 | |||
211 | /** |
||
212 | * @return bool |
||
213 | */ |
||
214 | public function isReadAllowed() : bool |
||
218 | |||
219 | /** |
||
220 | * @return GithubRepoCreatedAt |
||
221 | */ |
||
222 | public function getGithubCreatedAt() : GithubRepoCreatedAt |
||
226 | |||
227 | /** |
||
228 | * @return GithubRepoUpdatedAt |
||
229 | */ |
||
230 | public function getGithubUpdatedAt() : GithubRepoUpdatedAt |
||
234 | |||
235 | /** |
||
236 | * @return GithubRepoPushedAt |
||
237 | */ |
||
238 | public function getGithubPushedAt() : GithubRepoPushedAt |
||
242 | } |
||
243 |