Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Commit

Permalink
Merge 22b3d72 into 32dc984
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-de-wit committed Nov 1, 2018
2 parents 32dc984 + 22b3d72 commit aaa87e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Encoder/Transformers/ModelTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ public function transform($model)
Key::META => $this->serializeMetaData($resource),
];

if ( ! count($data[ Key::ATTRIBUTES ])) {
if ( ! count((array) $data[ Key::ATTRIBUTES ])) {
unset($data[ Key::ATTRIBUTES ]);
}

if ( ! count($data[ Key::RELATIONSHIPS ])) {
if ( ! count((array) $data[ Key::RELATIONSHIPS ])) {
unset($data[ Key::RELATIONSHIPS ]);
}

if ( ! count($data[ Key::META ])) {
if ( ! count((array) $data[ Key::META ])) {
unset($data[ Key::META ]);
}

Expand Down

0 comments on commit aaa87e4

Please sign in to comment.