@@ -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 | } |
@@ -171,11 +181,18 @@ discard block |
||
| 171 | 181 | return $remote; |
| 172 | 182 | } |
| 173 | 183 | |
| 184 | + /** |
|
| 185 | + * @param string $projectWithOrg |
|
| 186 | + */ |
|
| 174 | 187 | protected function existingPRs($projectWithOrg, VersionIdentifiers $vids) |
| 175 | 188 | { |
| 176 | 189 | return $this->matchingPRs($projectWithOrg, $vids->getPreamble(), $vids->pattern()); |
| 177 | 190 | } |
| 178 | 191 | |
| 192 | + /** |
|
| 193 | + * @param string $preamble |
|
| 194 | + * @param string $pattern |
|
| 195 | + */ |
|
| 179 | 196 | public function matchingPRs($projectWithOrg, $preamble, $pattern) |
| 180 | 197 | { |
| 181 | 198 | $q = "repo:$projectWithOrg in:title is:pr state:open $preamble"; |