@@ -193,6 +193,9 @@ discard block |
||
193 | 193 | return $this->getProjectWithOrfFromUrl($remote); |
194 | 194 | } |
195 | 195 | |
196 | + /** |
|
197 | + * @param string $remote |
|
198 | + */ |
|
196 | 199 | protected function getProjectWithOrfFromUrl($remote) |
197 | 200 | { |
198 | 201 | $remote = preg_replace('#^git@[^:]*:#', '', $remote); |
@@ -250,7 +253,7 @@ discard block |
||
250 | 253 | * _links: Links |
251 | 254 | * @default-fields number,user,title |
252 | 255 | * @default-string-field number |
253 | - * @return Consolidation\OutputFormatters\StructuredData\RowsOfFields |
|
256 | + * @return RowsOfFields |
|
254 | 257 | */ |
255 | 258 | public function prFind($projectWithOrg = '', $options = ['as' => 'default', 'format' => 'yaml', 'q' => '']) |
256 | 259 | { |
@@ -309,7 +312,7 @@ discard block |
||
309 | 312 | * head: Head |
310 | 313 | * base: Base |
311 | 314 | * _links: Links |
312 | - * @return Consolidation\OutputFormatters\StructuredData\PropertyList |
|
315 | + * @return PropertyList |
|
313 | 316 | */ |
314 | 317 | public function prShow($projectWithOrg = '', $number = '', $options = ['as' => 'default', 'format' => 'table']) |
315 | 318 | { |
@@ -346,7 +349,7 @@ discard block |
||
346 | 349 | * updated_at: Updated |
347 | 350 | * @default-fields id,creator,state,description |
348 | 351 | * @default-string-field description |
349 | - * @return Consolidation\OutputFormatters\StructuredData\RowsOfFields |
|
352 | + * @return RowsOfFields |
|
350 | 353 | */ |
351 | 354 | public function prStatuses($projectWithOrg = '', $number = '', $options = ['as' => 'default', 'format' => 'yaml']) |
352 | 355 | { |
@@ -404,7 +407,7 @@ discard block |
||
404 | 407 | * _links: Links |
405 | 408 | * @default-fields number,user,title |
406 | 409 | * @default-string-field number |
407 | - * @return Consolidation\OutputFormatters\StructuredData\RowsOfFields |
|
410 | + * @return RowsOfFields |
|
408 | 411 | */ |
409 | 412 | public function prList($projectWithOrg = '', $options = ['state' => 'open', 'as' => 'default', 'format' => 'table']) |
410 | 413 | { |
@@ -452,6 +455,9 @@ discard block |
||
452 | 455 | ); |
453 | 456 | } |
454 | 457 | |
458 | + /** |
|
459 | + * @param string $field |
|
460 | + */ |
|
455 | 461 | protected function keyById($data, $field) |
456 | 462 | { |
457 | 463 | return |
@@ -36,6 +36,9 @@ discard block |
||
36 | 36 | $this->eventLogger = null; |
37 | 37 | } |
38 | 38 | |
39 | + /** |
|
40 | + * @param string $as |
|
41 | + */ |
|
39 | 42 | public function setAs($as) |
40 | 43 | { |
41 | 44 | if ($as != $this->as) { |
@@ -122,6 +125,9 @@ discard block |
||
122 | 125 | return [$status, $existingPRs]; |
123 | 126 | } |
124 | 127 | |
128 | + /** |
|
129 | + * @param string $number |
|
130 | + */ |
|
125 | 131 | public function prStatuses($projectWithOrg, $number) |
126 | 132 | { |
127 | 133 | list($org, $project) = explode('/', $projectWithOrg, 2); |
@@ -141,6 +147,10 @@ discard block |
||
141 | 147 | uasort( |
142 | 148 | |
143 | 149 | $pullRequestStatus, |
150 | + |
|
151 | + /** |
|
152 | + * @param string $rhs |
|
153 | + */ |
|
144 | 154 | function ($lhs, $rhs) { |
145 | 155 | return abs(strtotime($lhs['updated_at']) - strtotime($rhs['updated_at'])); |
146 | 156 | } |
@@ -168,6 +178,9 @@ discard block |
||
168 | 178 | return $remote; |
169 | 179 | } |
170 | 180 | |
181 | + /** |
|
182 | + * @param string $projectWithOrg |
|
183 | + */ |
|
171 | 184 | protected function existingPRs($projectWithOrg, VersionIdentifiers $vids) |
172 | 185 | { |
173 | 186 | $preamble = $vids->getPreamble(); |