Skip to content

Commit cc4418b

Browse files
committed
added inline comment describing the change
1 parent dd565b2 commit cc4418b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/PaymentRails/ResourceCollection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ResourceCollection implements Iterator
4040
*/
4141
public function __construct($response, $items, $pager)
4242
{
43+
// Add "meta" fields only when they exist in JSON response
4344
$this->_page = isset($response["meta"]) ? $response["meta"]["page"] : null;
4445
$this->_items = $items;
4546
$this->_records = isset($response["meta"]) ? $response["meta"]["records"] : null;

0 commit comments

Comments
 (0)