Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding parameter comment and including formatted code #468

Merged
merged 1 commit into from
Mar 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions lib/recurly/pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,20 @@ public function __construct(\Recurly\BaseClient $client, string $path, ?array $p
* Maps parameters with array values into csv strings. The API expects these
* values to be csv strings, but an array is a nicer interface for developers.
*
* @param array $params
* @param array $params Associative array of parameters
*
* @return array
*/
private function _mapArrayParams(?array $params = []): ?array
{
if (!is_null($params)) {
array_walk($params, function(&$param, $key) {
if (is_array($param)) {
$param = join(',', $param);
array_walk(
$params, function (&$param, $key) {
if (is_array($param)) {
$param = join(',', $param);
}
}
});
);
}
return $params;
}
Expand Down Expand Up @@ -150,4 +152,4 @@ private function _loadNextPage(): void
$next_page = $this->_current_page->getNext();
$this->_current_page = $this->_client->nextPage($next_page, null);
}
}
}