Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
bessudnov committed May 29, 2023
2 parents 8205f99 + 77c5961 commit 92c2b41
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/AmoCRM/Models/Sources/SourceServiceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ public static function fromArray(array $data): self

public function toArray(): array
{
return [
'type' => $this->getType(),
$result = [
'type' => $this->getType(),
'pages' => $this->getPages()->toArray(),
'params' => $this->getParams()->toArray(),
'params' => [],
];
if ($this->getParams() !== null) {
$result['params'] = $this->getParams()->toArray();
}

return $result;
}

public function toApi(string $requestId = null): array
Expand Down

0 comments on commit 92c2b41

Please sign in to comment.