Skip to content

Commit 22ec104

Browse files
committed
Merge pull request #4 from marc94rc/master
Setting default limit fetching notifications
2 parents 2aa1b44 + 059dbd5 commit 22ec104

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Notifications.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,13 @@ public function getOne($id)
4646
*
4747
* Application authentication key and ID must be set.
4848
*
49-
* @param int $limit Results offset (results are sorted by ID)
50-
* @param int $offset How many notifications to return (max 50)
49+
* @param int $limit How many notifications to return (max 50)
50+
* @param int $offset Results offset (results are sorted by ID)
51+
*
5152
*
5253
* @return array
5354
*/
54-
public function getAll($limit = null, $offset = null)
55+
public function getAll($limit = 50, $offset = 0)
5556
{
5657
return $this->api->request('GET', '/notifications?' . http_build_query([
5758
'limit' => max(0, min(50, filter_var($limit, FILTER_VALIDATE_INT))),

0 commit comments

Comments
 (0)