@@ -85,7 +85,6 @@ public function getRepositories(
85
85
$ allRepos = array_merge ($ allRepos , $ repos );
86
86
87
87
$ page ++;
88
-
89
88
} while (count ($ repos ) === $ perPage );
90
89
91
90
return $ allRepos ;
@@ -165,7 +164,6 @@ public function getCommitsFromRepository(
165
164
$ allCommits = array_merge ($ allCommits , $ commits );
166
165
167
166
$ page ++;
168
-
169
167
} while (count ($ commits ) === $ perPage );
170
168
171
169
return $ allCommits ;
@@ -231,21 +229,20 @@ public function getIssues(
231
229
$ allIssues = array_merge ($ allIssues , $ issues );
232
230
233
231
$ page ++;
234
-
235
232
} while (count ($ issues ) === $ perPage );
236
233
237
234
return $ allIssues ;
238
235
}
239
236
240
237
/**
241
- * Get pull requests from a repository.
242
- *
243
- * @param string $owner The owner of the repository
244
- * @param string $repo The name of the repository
245
- * @param int $perPage Number of results per page. Default: 25
246
- * @param int $page Page number of the results to fetch. Default: 1
247
- * @return array|null Array of pull requests
248
- */
238
+ * Get pull requests from a repository.
239
+ *
240
+ * @param string $owner The owner of the repository
241
+ * @param string $repo The name of the repository
242
+ * @param int $perPage Number of results per page. Default: 25
243
+ * @param int $page Page number of the results to fetch. Default: 1
244
+ * @return array|null Array of pull requests
245
+ */
249
246
public function getPullRequests (
250
247
string $ repo ,
251
248
string $ owner ,
@@ -265,17 +262,15 @@ public function getPullRequests(
265
262
]);
266
263
267
264
if ($ response ->failed ()) {
268
- return null ;
265
+ return [] ;
269
266
}
270
267
271
268
$ pullRequests = $ response ->json ();
272
269
$ allPullRequests = array_merge ($ allPullRequests , $ pullRequests );
273
270
274
271
$ page ++;
275
-
276
272
} while (count ($ pullRequests ) === $ perPage );
277
273
278
274
return $ allPullRequests ;
279
275
}
280
276
}
281
-
0 commit comments