Skip to content

Commit 8a280e4

Browse files
committed
Support ParcelStatus findAll's
1 parent 7f1e83e commit 8a280e4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/Picqer/Carriers/SendCloud/Query/FindAll.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,16 @@ public function collectionFromResult($result)
2525
{
2626
$collection = [];
2727

28-
foreach ($result[$this->namespaces['plural']] as $r) {
29-
$collection[] = new self($this->connection(), $r);
28+
$resultsContainer = $result;
29+
if (isset($result[$this->namespaces['plural']])) {
30+
$resultsContainer = $result[$this->namespaces['plural']];
31+
}
32+
33+
foreach ($resultsContainer as $item) {
34+
$collection[] = new self($this->connection(), $item);
3035
}
3136

3237
return $collection;
3338
}
3439

35-
}
40+
}

0 commit comments

Comments
 (0)