Skip to content

Commit

Permalink
Run Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 authored and github-actions[bot] committed Feb 17, 2024
1 parent e964025 commit 34b5bb1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Endpoint/Concerns/SavesData.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,19 @@ private function parseData(Context $context): array
))->setSource(['pointer' => '/data/type']);
}

if (array_key_exists('attributes', $body['data']) && !is_array($body['data']['attributes'])) {
if (
array_key_exists('attributes', $body['data']) &&
!is_array($body['data']['attributes'])
) {
throw (new BadRequestException('data.attributes must be an object'))->setSource([
'pointer' => '/data/attributes',
]);
}

if (array_key_exists('relationships', $body['data']) && !is_array($body['data']['relationships'])) {
if (
array_key_exists('relationships', $body['data']) &&
!is_array($body['data']['relationships'])
) {
throw (new BadRequestException('data.relationships must be an object'))->setSource([
'pointer' => '/data/relationships',
]);
Expand Down

0 comments on commit 34b5bb1

Please sign in to comment.