From 30acdc89aa1cfdd8e2618cf10695df9fbe111c74 Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Tue, 29 Oct 2019 10:35:39 +0100 Subject: [PATCH] Fix construct method from Entity class --- src/Data/Entity.php | 3 +-- src/Data/QueryResponse.php | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Data/Entity.php b/src/Data/Entity.php index 2a54973..c8d3079 100644 --- a/src/Data/Entity.php +++ b/src/Data/Entity.php @@ -13,8 +13,7 @@ class Entity implements \JsonSerializable */ public function __construct(array $data) { - $values = array_values($data); - $this->data = isset($values[0]) && is_array($values[0]) ? $values[0] : $data; + $this->data = $data; } /** diff --git a/src/Data/QueryResponse.php b/src/Data/QueryResponse.php index d6a847a..7152010 100644 --- a/src/Data/QueryResponse.php +++ b/src/Data/QueryResponse.php @@ -2,8 +2,6 @@ namespace ActiveCollab\Quickbooks\Data; -use ActiveCollab\Quickbooks\Data\Entity; - class QueryResponse implements \IteratorAggregate, \Countable, \JsonSerializable { /**