1 | <?php |
||
12 | class GithubRepoSource implements GithubRepo, GithubRepoPermissonsInterface |
||
13 | { |
||
14 | /** @var GithubRepoId */ |
||
15 | private $id; |
||
16 | /** @var GithubUser */ |
||
17 | private $ownerUser; |
||
18 | /** @var string */ |
||
19 | private $owner; |
||
20 | /** @var string */ |
||
21 | private $name; |
||
22 | /** @var string */ |
||
23 | private $fullName; |
||
24 | /** @var string */ |
||
25 | private $htmlUrl; |
||
26 | /** @var string */ |
||
27 | private $description; |
||
28 | /** @var int */ |
||
29 | private $fork; |
||
30 | /** @var string */ |
||
31 | private $defaultBranch; |
||
32 | /** @var int */ |
||
33 | private $private; |
||
34 | /** @var string */ |
||
35 | private $gitUrl; |
||
36 | /** @var string */ |
||
37 | private $sshUrl; |
||
38 | /** @var GithubRepoPermissions */ |
||
39 | private $permissions; |
||
40 | /** @var DateTime */ |
||
41 | private $githubCreatedAt; |
||
42 | /** @var DateTime */ |
||
43 | private $githubUpdatedAt; |
||
44 | /** @var DateTime */ |
||
45 | private $githubPushedAt; |
||
46 | |||
47 | /** |
||
48 | * GithubRepoSource constructor. |
||
49 | * |
||
50 | * @param GithubRepoId $id |
||
51 | * @param GithubUser $ownerUser |
||
52 | * @param string $owner |
||
53 | * @param string $name |
||
54 | * @param string $fullName |
||
55 | * @param string $htmlUrl |
||
56 | * @param string $description |
||
57 | * @param bool $fork |
||
58 | * @param string $defaultBranch |
||
59 | * @param bool $private |
||
60 | * @param string $gitUrl |
||
61 | * @param string $sshUrl |
||
62 | * @param GithubRepoPermissions $permissions |
||
63 | * @param DateTime $githubCreatedAt |
||
64 | * @param DateTime $githubUpdatedAt |
||
65 | * @param DateTime $githubPushedAt |
||
66 | * |
||
67 | * @SuppressWarnings(PHPMD.ExcessiveParameterList) |
||
68 | */ |
||
69 | public function __construct( |
||
104 | |||
105 | /** |
||
106 | * @return GithubRepoId |
||
107 | */ |
||
108 | public function getId() |
||
112 | |||
113 | /** |
||
114 | * @return GithubUserId |
||
115 | */ |
||
116 | public function getOwnerUserId() |
||
120 | |||
121 | /** |
||
122 | * @return GithubUser |
||
123 | */ |
||
124 | public function getOwnerUser() |
||
128 | |||
129 | /** |
||
130 | * @return string |
||
131 | */ |
||
132 | public function getOwner() |
||
136 | |||
137 | /** |
||
138 | * @return string |
||
139 | */ |
||
140 | public function getName() |
||
144 | |||
145 | /** |
||
146 | * @return string |
||
147 | */ |
||
148 | public function getFullName() |
||
152 | |||
153 | /** |
||
154 | * @return string |
||
155 | */ |
||
156 | public function getHtmlUrl() |
||
160 | |||
161 | /** |
||
162 | * @return string |
||
163 | */ |
||
164 | public function getDescription() |
||
168 | |||
169 | /** |
||
170 | * @return int |
||
171 | */ |
||
172 | public function isFork() |
||
176 | |||
177 | /** |
||
178 | * @return string |
||
179 | */ |
||
180 | public function getDefaultBranch() |
||
184 | |||
185 | /** |
||
186 | * @return int |
||
187 | */ |
||
188 | public function isPrivate() |
||
192 | |||
193 | /** |
||
194 | * @return string |
||
195 | */ |
||
196 | public function getGitUrl() |
||
200 | |||
201 | /** |
||
202 | * @return string |
||
203 | */ |
||
204 | public function getSshUrl() |
||
208 | |||
209 | /** |
||
210 | * @return bool |
||
211 | */ |
||
212 | public function isAdmin() |
||
216 | |||
217 | /** |
||
218 | * @return bool |
||
219 | */ |
||
220 | public function isPushAllowed() |
||
224 | |||
225 | /** |
||
226 | * @return bool |
||
227 | */ |
||
228 | public function isReadAllowed() |
||
232 | |||
233 | /** |
||
234 | * @return DateTime |
||
235 | */ |
||
236 | public function getGithubCreatedAt() |
||
240 | |||
241 | /** |
||
242 | * @return DateTime |
||
243 | */ |
||
244 | public function getGithubUpdatedAt() |
||
248 | |||
249 | /** |
||
250 | * @return DateTime |
||
251 | */ |
||
252 | public function getGithubPushedAt() |
||
256 | } |
||
257 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.