Skip to content

Commit

Permalink
Optional parameters should not come before required parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mroloux committed Jul 9, 2021
1 parent 522b22a commit 2c8fc90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/Subaccounts/FilterableSubaccountLister.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function all($queryParams)
* @param $queryParams SubaccountListParams[]
* @return SubaccountPage
*/
public function firstPage($pageSize = null, $queryParams)
public function firstPage($queryParams, $pageSize = null)
{
return $this->pageFetcher->fetchAfter(null, $queryParams, $pageSize);
}
Expand All @@ -37,7 +37,7 @@ public function firstPage($pageSize = null, $queryParams)
* @param $queryParams SubaccountListParams[]
* @return SubaccountPage
*/
public function pageAfter($afterId, $pageSize = null, $queryParams)
public function pageAfter($afterId, $queryParams, $pageSize = null)
{
return $this->pageFetcher->fetchAfter($afterId, $queryParams, $pageSize);
}
Expand All @@ -48,8 +48,8 @@ public function pageAfter($afterId, $pageSize = null, $queryParams)
* @param $queryParams SubaccountListParams[]
* @return SubaccountPage
*/
public function pageBefore($beforeId, $pageSize = null, $queryParams)
public function pageBefore($beforeId, $queryParams, $pageSize = null)
{
return $this->pageFetcher->fetchBefore($beforeId, $queryParams, $pageSize);
}
}
}
6 changes: 3 additions & 3 deletions src/Subaccounts/Subaccounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function listAll($subaccountListParams = null)
*/
public function listFirstPage($pageSize = null, $subaccountListParams = null)
{
return $this->iterator()->firstPage($pageSize, $this->listParamsToArray($subaccountListParams));
return $this->iterator()->firstPage($this->listParamsToArray($subaccountListParams), $pageSize);
}

/**
Expand All @@ -171,7 +171,7 @@ public function listFirstPage($pageSize = null, $subaccountListParams = null)
*/
public function listPageAfter($afterId, $pageSize = null, $subaccountListParams = null)
{
return $this->iterator()->pageAfter($afterId, $pageSize, $this->listParamsToArray($subaccountListParams));
return $this->iterator()->pageAfter($afterId, $this->listParamsToArray($subaccountListParams), $pageSize);
}

/**
Expand All @@ -182,7 +182,7 @@ public function listPageAfter($afterId, $pageSize = null, $subaccountListParams
*/
public function listPageBefore($beforeId, $pageSize = null, $subaccountListParams = null)
{
return $this->iterator()->pageBefore($beforeId, $pageSize, $this->listParamsToArray($subaccountListParams));
return $this->iterator()->pageBefore($beforeId, $this->listParamsToArray($subaccountListParams), $pageSize);
}

/**
Expand Down

0 comments on commit 2c8fc90

Please sign in to comment.