Skip to content

Commit

Permalink
fix(lib): generate code from braze-specification 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored and remarkablemark committed Oct 10, 2024
1 parent 27c2bd2 commit 88fd3ef
Show file tree
Hide file tree
Showing 16 changed files with 308 additions and 180 deletions.
6 changes: 3 additions & 3 deletions lib/Model/CampaignsTriggerScheduleCreatePostBodyAudience.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ public function isInitialized($property): bool
return array_key_exists($property, $this->initialized);
}
/**
* @var list<mixed>
* @var list<array<string, mixed>>
*/
protected $aND;

/**
* @return list<mixed>
* @return list<array<string, mixed>>
*/
public function getAND(): array
{
return $this->aND;
}

/**
* @param list<mixed> $aND
* @param list<array<string, mixed>> $aND
*/
public function setAND(array $aND): self
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/CampaignsTriggerSendPostBodyAudience.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ public function isInitialized($property): bool
return array_key_exists($property, $this->initialized);
}
/**
* @var list<mixed>
* @var list<array<string, mixed>>
*/
protected $aND;

/**
* @return list<mixed>
* @return list<array<string, mixed>>
*/
public function getAND(): array
{
return $this->aND;
}

/**
* @param list<mixed> $aND
* @param list<array<string, mixed>> $aND
*/
public function setAND(array $aND): self
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/CanvasTriggerScheduleCreatePostBodyAudience.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ public function isInitialized($property): bool
return array_key_exists($property, $this->initialized);
}
/**
* @var list<mixed>
* @var list<array<string, mixed>>
*/
protected $aND;

/**
* @return list<mixed>
* @return list<array<string, mixed>>
*/
public function getAND(): array
{
return $this->aND;
}

/**
* @param list<mixed> $aND
* @param list<array<string, mixed>> $aND
*/
public function setAND(array $aND): self
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/CanvasTriggerSendPostBodyAudience.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ public function isInitialized($property): bool
return array_key_exists($property, $this->initialized);
}
/**
* @var list<mixed>
* @var list<array<string, mixed>>
*/
protected $aND;

/**
* @return list<mixed>
* @return list<array<string, mixed>>
*/
public function getAND(): array
{
return $this->aND;
}

/**
* @param list<mixed> $aND
* @param list<array<string, mixed>> $aND
*/
public function setAND(array $aND): self
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/MessagesScheduleCreatePostBodyAudience.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ public function isInitialized($property): bool
return array_key_exists($property, $this->initialized);
}
/**
* @var list<mixed>
* @var list<array<string, mixed>>
*/
protected $aND;

/**
* @return list<mixed>
* @return list<array<string, mixed>>
*/
public function getAND(): array
{
return $this->aND;
}

/**
* @param list<mixed> $aND
* @param list<array<string, mixed>> $aND
*/
public function setAND(array $aND): self
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/MessagesSendPostBodyAudience.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ public function isInitialized($property): bool
return array_key_exists($property, $this->initialized);
}
/**
* @var list<mixed>
* @var list<array<string, mixed>>
*/
protected $aND;

/**
* @return list<mixed>
* @return list<array<string, mixed>>
*/
public function getAND(): array
{
return $this->aND;
}

/**
* @param list<mixed> $aND
* @param list<array<string, mixed>> $aND
*/
public function setAND(array $aND): self
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/UsersMergePostBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ public function isInitialized($property): bool
return array_key_exists($property, $this->initialized);
}
/**
* @var list<mixed>
* @var list<array<string, mixed>>
*/
protected $mergeUpdates;

/**
* @return list<mixed>
* @return list<array<string, mixed>>
*/
public function getMergeUpdates(): array
{
return $this->mergeUpdates;
}

/**
* @param list<mixed> $mergeUpdates
* @param list<array<string, mixed>> $mergeUpdates
*/
public function setMergeUpdates(array $mergeUpdates): self
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/UsersTrackPostBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function isInitialized($property): bool
*/
protected $attributes;
/**
* @var list<mixed>
* @var list<array<string, mixed>>
*/
protected $events;
/**
Expand Down Expand Up @@ -54,15 +54,15 @@ public function setAttributes(array $attributes): self
}

/**
* @return list<mixed>
* @return list<array<string, mixed>>
*/
public function getEvents(): array
{
return $this->events;
}

/**
* @param list<mixed> $events
* @param list<array<string, mixed>> $events
*/
public function setEvents(array $events): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,18 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a
if (\array_key_exists('AND', $data)) {
$values = [];
foreach ($data['AND'] as $value) {
$values[] = $value;
$values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($value as $key => $value_1) {
$values_1[$key] = $value_1;

Check warning on line 59 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L57-L59

Added lines #L57 - L59 were not covered by tests
}
$values[] = $values_1;

Check warning on line 61 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L61

Added line #L61 was not covered by tests
}
$object->setAND($values);
unset($data['AND']);
}
foreach ($data as $key => $value_1) {
if (preg_match('/.*/', (string) $key)) {
$object[$key] = $value_1;
foreach ($data as $key_1 => $value_2) {
if (preg_match('/.*/', (string) $key_1)) {
$object[$key_1] = $value_2;

Check warning on line 68 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L66-L68

Added lines #L66 - L68 were not covered by tests
}
}

Expand All @@ -74,13 +78,17 @@ public function normalize(mixed $object, ?string $format = null, array $context
if ($object->isInitialized('aND') && null !== $object->getAND()) {
$values = [];
foreach ($object->getAND() as $value) {
$values[] = $value;
$values_1 = [];
foreach ($value as $key => $value_1) {
$values_1[$key] = $value_1;

Check warning on line 83 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L81-L83

Added lines #L81 - L83 were not covered by tests
}
$values[] = $values_1;

Check warning on line 85 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L85

Added line #L85 was not covered by tests
}
$data['AND'] = $values;
}
foreach ($object as $key => $value_1) {
if (preg_match('/.*/', (string) $key)) {
$data[$key] = $value_1;
foreach ($object as $key_1 => $value_2) {
if (preg_match('/.*/', (string) $key_1)) {
$data[$key_1] = $value_2;

Check warning on line 91 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L89-L91

Added lines #L89 - L91 were not covered by tests
}
}

Expand Down Expand Up @@ -125,14 +133,18 @@ public function denormalize($data, $type, $format = null, array $context = [])
if (\array_key_exists('AND', $data)) {
$values = [];
foreach ($data['AND'] as $value) {
$values[] = $value;
$values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($value as $key => $value_1) {
$values_1[$key] = $value_1;

Check warning on line 138 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L136-L138

Added lines #L136 - L138 were not covered by tests
}
$values[] = $values_1;

Check warning on line 140 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L140

Added line #L140 was not covered by tests
}
$object->setAND($values);
unset($data['AND']);
}
foreach ($data as $key => $value_1) {
if (preg_match('/.*/', (string) $key)) {
$object[$key] = $value_1;
foreach ($data as $key_1 => $value_2) {
if (preg_match('/.*/', (string) $key_1)) {
$object[$key_1] = $value_2;

Check warning on line 147 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L145-L147

Added lines #L145 - L147 were not covered by tests
}
}

Expand All @@ -148,13 +160,17 @@ public function normalize($object, $format = null, array $context = [])
if ($object->isInitialized('aND') && null !== $object->getAND()) {
$values = [];
foreach ($object->getAND() as $value) {
$values[] = $value;
$values_1 = [];
foreach ($value as $key => $value_1) {
$values_1[$key] = $value_1;

Check warning on line 165 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L163-L165

Added lines #L163 - L165 were not covered by tests
}
$values[] = $values_1;

Check warning on line 167 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L167

Added line #L167 was not covered by tests
}
$data['AND'] = $values;
}
foreach ($object as $key => $value_1) {
if (preg_match('/.*/', (string) $key)) {
$data[$key] = $value_1;
foreach ($object as $key_1 => $value_2) {
if (preg_match('/.*/', (string) $key_1)) {
$data[$key_1] = $value_2;

Check warning on line 173 in lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php#L171-L173

Added lines #L171 - L173 were not covered by tests
}
}

Expand Down
48 changes: 32 additions & 16 deletions lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,18 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a
if (\array_key_exists('AND', $data)) {
$values = [];
foreach ($data['AND'] as $value) {
$values[] = $value;
$values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($value as $key => $value_1) {
$values_1[$key] = $value_1;

Check warning on line 59 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L57-L59

Added lines #L57 - L59 were not covered by tests
}
$values[] = $values_1;

Check warning on line 61 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L61

Added line #L61 was not covered by tests
}
$object->setAND($values);
unset($data['AND']);
}
foreach ($data as $key => $value_1) {
if (preg_match('/.*/', (string) $key)) {
$object[$key] = $value_1;
foreach ($data as $key_1 => $value_2) {
if (preg_match('/.*/', (string) $key_1)) {
$object[$key_1] = $value_2;

Check warning on line 68 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L66-L68

Added lines #L66 - L68 were not covered by tests
}
}

Expand All @@ -74,13 +78,17 @@ public function normalize(mixed $object, ?string $format = null, array $context
if ($object->isInitialized('aND') && null !== $object->getAND()) {
$values = [];
foreach ($object->getAND() as $value) {
$values[] = $value;
$values_1 = [];
foreach ($value as $key => $value_1) {
$values_1[$key] = $value_1;

Check warning on line 83 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L81-L83

Added lines #L81 - L83 were not covered by tests
}
$values[] = $values_1;

Check warning on line 85 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L85

Added line #L85 was not covered by tests
}
$data['AND'] = $values;
}
foreach ($object as $key => $value_1) {
if (preg_match('/.*/', (string) $key)) {
$data[$key] = $value_1;
foreach ($object as $key_1 => $value_2) {
if (preg_match('/.*/', (string) $key_1)) {
$data[$key_1] = $value_2;

Check warning on line 91 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L89-L91

Added lines #L89 - L91 were not covered by tests
}
}

Expand Down Expand Up @@ -125,14 +133,18 @@ public function denormalize($data, $type, $format = null, array $context = [])
if (\array_key_exists('AND', $data)) {
$values = [];
foreach ($data['AND'] as $value) {
$values[] = $value;
$values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($value as $key => $value_1) {
$values_1[$key] = $value_1;

Check warning on line 138 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L136-L138

Added lines #L136 - L138 were not covered by tests
}
$values[] = $values_1;

Check warning on line 140 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L140

Added line #L140 was not covered by tests
}
$object->setAND($values);
unset($data['AND']);
}
foreach ($data as $key => $value_1) {
if (preg_match('/.*/', (string) $key)) {
$object[$key] = $value_1;
foreach ($data as $key_1 => $value_2) {
if (preg_match('/.*/', (string) $key_1)) {
$object[$key_1] = $value_2;

Check warning on line 147 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L145-L147

Added lines #L145 - L147 were not covered by tests
}
}

Expand All @@ -148,13 +160,17 @@ public function normalize($object, $format = null, array $context = [])
if ($object->isInitialized('aND') && null !== $object->getAND()) {
$values = [];
foreach ($object->getAND() as $value) {
$values[] = $value;
$values_1 = [];
foreach ($value as $key => $value_1) {
$values_1[$key] = $value_1;

Check warning on line 165 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L163-L165

Added lines #L163 - L165 were not covered by tests
}
$values[] = $values_1;

Check warning on line 167 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L167

Added line #L167 was not covered by tests
}
$data['AND'] = $values;
}
foreach ($object as $key => $value_1) {
if (preg_match('/.*/', (string) $key)) {
$data[$key] = $value_1;
foreach ($object as $key_1 => $value_2) {
if (preg_match('/.*/', (string) $key_1)) {
$data[$key_1] = $value_2;

Check warning on line 173 in lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php

View check run for this annotation

Codecov / codecov/patch

lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php#L171-L173

Added lines #L171 - L173 were not covered by tests
}
}

Expand Down
Loading

0 comments on commit 88fd3ef

Please sign in to comment.