Skip to content

Commit c59819f

Browse files
author
Justinas Pošiūnas
committed
composer.json and collection fix
1 parent 1bb23fc commit c59819f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"description": "MailerLite API v2 PHP SDK",
44
"homepage": "https://github.com/mailerlite/mailerlite-api-v2-php-sdk",
55
"license": "MIT",
6+
"keywords": ["mailerlite", "sdk", "email", "marketing"],
7+
"type": "library",
68
"require": {
79
"php" : "^5.4|^7.0",
810
"guzzlehttp/psr7": "~1.2",

src/Common/ApiAbstract.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ public function where(
185185
*/
186186
public function generateCollection($items)
187187
{
188+
if ( ! is_array($items)) {
189+
$items = [$items];
190+
}
191+
188192
return new Collection($items);
189193
}
190194

0 commit comments

Comments
 (0)