From 88fd3ef72e3c2596404829e8b79ae30f2702bcf2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 10 Oct 2024 13:47:35 +0000 Subject: [PATCH] fix(lib): generate code from braze-specification 1.2.2 https://github.com/braze-community/braze-specification/pull/124 --- ...sTriggerScheduleCreatePostBodyAudience.php | 6 +- .../CampaignsTriggerSendPostBodyAudience.php | 6 +- ...sTriggerScheduleCreatePostBodyAudience.php | 6 +- .../CanvasTriggerSendPostBodyAudience.php | 6 +- ...MessagesScheduleCreatePostBodyAudience.php | 6 +- lib/Model/MessagesSendPostBodyAudience.php | 6 +- lib/Model/UsersMergePostBody.php | 6 +- lib/Model/UsersTrackPostBody.php | 6 +- ...heduleCreatePostBodyAudienceNormalizer.php | 48 +++++--- ...sTriggerSendPostBodyAudienceNormalizer.php | 48 +++++--- ...heduleCreatePostBodyAudienceNormalizer.php | 48 +++++--- ...sTriggerSendPostBodyAudienceNormalizer.php | 48 +++++--- ...heduleCreatePostBodyAudienceNormalizer.php | 48 +++++--- ...MessagesSendPostBodyAudienceNormalizer.php | 48 +++++--- .../UsersMergePostBodyNormalizer.php | 48 +++++--- .../UsersTrackPostBodyNormalizer.php | 104 ++++++++++-------- 16 files changed, 308 insertions(+), 180 deletions(-) diff --git a/lib/Model/CampaignsTriggerScheduleCreatePostBodyAudience.php b/lib/Model/CampaignsTriggerScheduleCreatePostBodyAudience.php index 8b2b4d1..67fa1fd 100644 --- a/lib/Model/CampaignsTriggerScheduleCreatePostBodyAudience.php +++ b/lib/Model/CampaignsTriggerScheduleCreatePostBodyAudience.php @@ -22,12 +22,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * @var list + * @var list> */ protected $aND; /** - * @return list + * @return list> */ public function getAND(): array { @@ -35,7 +35,7 @@ public function getAND(): array } /** - * @param list $aND + * @param list> $aND */ public function setAND(array $aND): self { diff --git a/lib/Model/CampaignsTriggerSendPostBodyAudience.php b/lib/Model/CampaignsTriggerSendPostBodyAudience.php index 3c3cccc..ff9fb23 100644 --- a/lib/Model/CampaignsTriggerSendPostBodyAudience.php +++ b/lib/Model/CampaignsTriggerSendPostBodyAudience.php @@ -22,12 +22,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * @var list + * @var list> */ protected $aND; /** - * @return list + * @return list> */ public function getAND(): array { @@ -35,7 +35,7 @@ public function getAND(): array } /** - * @param list $aND + * @param list> $aND */ public function setAND(array $aND): self { diff --git a/lib/Model/CanvasTriggerScheduleCreatePostBodyAudience.php b/lib/Model/CanvasTriggerScheduleCreatePostBodyAudience.php index 41ebf82..2bcc2e2 100644 --- a/lib/Model/CanvasTriggerScheduleCreatePostBodyAudience.php +++ b/lib/Model/CanvasTriggerScheduleCreatePostBodyAudience.php @@ -22,12 +22,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * @var list + * @var list> */ protected $aND; /** - * @return list + * @return list> */ public function getAND(): array { @@ -35,7 +35,7 @@ public function getAND(): array } /** - * @param list $aND + * @param list> $aND */ public function setAND(array $aND): self { diff --git a/lib/Model/CanvasTriggerSendPostBodyAudience.php b/lib/Model/CanvasTriggerSendPostBodyAudience.php index ea1179f..5052c24 100644 --- a/lib/Model/CanvasTriggerSendPostBodyAudience.php +++ b/lib/Model/CanvasTriggerSendPostBodyAudience.php @@ -22,12 +22,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * @var list + * @var list> */ protected $aND; /** - * @return list + * @return list> */ public function getAND(): array { @@ -35,7 +35,7 @@ public function getAND(): array } /** - * @param list $aND + * @param list> $aND */ public function setAND(array $aND): self { diff --git a/lib/Model/MessagesScheduleCreatePostBodyAudience.php b/lib/Model/MessagesScheduleCreatePostBodyAudience.php index 905862d..3e8a6d3 100644 --- a/lib/Model/MessagesScheduleCreatePostBodyAudience.php +++ b/lib/Model/MessagesScheduleCreatePostBodyAudience.php @@ -22,12 +22,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * @var list + * @var list> */ protected $aND; /** - * @return list + * @return list> */ public function getAND(): array { @@ -35,7 +35,7 @@ public function getAND(): array } /** - * @param list $aND + * @param list> $aND */ public function setAND(array $aND): self { diff --git a/lib/Model/MessagesSendPostBodyAudience.php b/lib/Model/MessagesSendPostBodyAudience.php index 743ec70..76d5c6e 100644 --- a/lib/Model/MessagesSendPostBodyAudience.php +++ b/lib/Model/MessagesSendPostBodyAudience.php @@ -22,12 +22,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * @var list + * @var list> */ protected $aND; /** - * @return list + * @return list> */ public function getAND(): array { @@ -35,7 +35,7 @@ public function getAND(): array } /** - * @param list $aND + * @param list> $aND */ public function setAND(array $aND): self { diff --git a/lib/Model/UsersMergePostBody.php b/lib/Model/UsersMergePostBody.php index 84e540f..089f05d 100644 --- a/lib/Model/UsersMergePostBody.php +++ b/lib/Model/UsersMergePostBody.php @@ -22,12 +22,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * @var list + * @var list> */ protected $mergeUpdates; /** - * @return list + * @return list> */ public function getMergeUpdates(): array { @@ -35,7 +35,7 @@ public function getMergeUpdates(): array } /** - * @param list $mergeUpdates + * @param list> $mergeUpdates */ public function setMergeUpdates(array $mergeUpdates): self { diff --git a/lib/Model/UsersTrackPostBody.php b/lib/Model/UsersTrackPostBody.php index abc6581..09ffd7d 100644 --- a/lib/Model/UsersTrackPostBody.php +++ b/lib/Model/UsersTrackPostBody.php @@ -26,7 +26,7 @@ public function isInitialized($property): bool */ protected $attributes; /** - * @var list + * @var list> */ protected $events; /** @@ -54,7 +54,7 @@ public function setAttributes(array $attributes): self } /** - * @return list + * @return list> */ public function getEvents(): array { @@ -62,7 +62,7 @@ public function getEvents(): array } /** - * @param list $events + * @param list> $events */ public function setEvents(array $events): self { diff --git a/lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php b/lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php index 072d76f..d4a61f5 100644 --- a/lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php +++ b/lib/Normalizer/CampaignsTriggerScheduleCreatePostBodyAudienceNormalizer.php @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } diff --git a/lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php b/lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php index a6fd846..cb67a3e 100644 --- a/lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php +++ b/lib/Normalizer/CampaignsTriggerSendPostBodyAudienceNormalizer.php @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } diff --git a/lib/Normalizer/CanvasTriggerScheduleCreatePostBodyAudienceNormalizer.php b/lib/Normalizer/CanvasTriggerScheduleCreatePostBodyAudienceNormalizer.php index 6b6dc46..8db562e 100644 --- a/lib/Normalizer/CanvasTriggerScheduleCreatePostBodyAudienceNormalizer.php +++ b/lib/Normalizer/CanvasTriggerScheduleCreatePostBodyAudienceNormalizer.php @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } diff --git a/lib/Normalizer/CanvasTriggerSendPostBodyAudienceNormalizer.php b/lib/Normalizer/CanvasTriggerSendPostBodyAudienceNormalizer.php index 5a8f38c..36703b3 100644 --- a/lib/Normalizer/CanvasTriggerSendPostBodyAudienceNormalizer.php +++ b/lib/Normalizer/CanvasTriggerSendPostBodyAudienceNormalizer.php @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } diff --git a/lib/Normalizer/MessagesScheduleCreatePostBodyAudienceNormalizer.php b/lib/Normalizer/MessagesScheduleCreatePostBodyAudienceNormalizer.php index 1f09cdd..87a1cf4 100644 --- a/lib/Normalizer/MessagesScheduleCreatePostBodyAudienceNormalizer.php +++ b/lib/Normalizer/MessagesScheduleCreatePostBodyAudienceNormalizer.php @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } diff --git a/lib/Normalizer/MessagesSendPostBodyAudienceNormalizer.php b/lib/Normalizer/MessagesSendPostBodyAudienceNormalizer.php index 09c035f..fd46e0b 100644 --- a/lib/Normalizer/MessagesSendPostBodyAudienceNormalizer.php +++ b/lib/Normalizer/MessagesSendPostBodyAudienceNormalizer.php @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } @@ -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; + } + $values[] = $values_1; } $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; } } diff --git a/lib/Normalizer/UsersMergePostBodyNormalizer.php b/lib/Normalizer/UsersMergePostBodyNormalizer.php index 6edaa7d..9fa2389 100644 --- a/lib/Normalizer/UsersMergePostBodyNormalizer.php +++ b/lib/Normalizer/UsersMergePostBodyNormalizer.php @@ -54,14 +54,18 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (\array_key_exists('merge_updates', $data)) { $values = []; foreach ($data['merge_updates'] as $value) { - $values[] = $value; + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; } $object->setMergeUpdates($values); unset($data['merge_updates']); } - 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; } } @@ -74,13 +78,17 @@ public function normalize(mixed $object, ?string $format = null, array $context if ($object->isInitialized('mergeUpdates') && null !== $object->getMergeUpdates()) { $values = []; foreach ($object->getMergeUpdates() as $value) { - $values[] = $value; + $values_1 = []; + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; } $data['merge_updates'] = $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; } } @@ -125,14 +133,18 @@ public function denormalize($data, $type, $format = null, array $context = []) if (\array_key_exists('merge_updates', $data)) { $values = []; foreach ($data['merge_updates'] as $value) { - $values[] = $value; + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; } $object->setMergeUpdates($values); unset($data['merge_updates']); } - 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; } } @@ -148,13 +160,17 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('mergeUpdates') && null !== $object->getMergeUpdates()) { $values = []; foreach ($object->getMergeUpdates() as $value) { - $values[] = $value; + $values_1 = []; + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; } $data['merge_updates'] = $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; } } diff --git a/lib/Normalizer/UsersTrackPostBodyNormalizer.php b/lib/Normalizer/UsersTrackPostBodyNormalizer.php index 624cd36..5e85dd1 100644 --- a/lib/Normalizer/UsersTrackPostBodyNormalizer.php +++ b/lib/Normalizer/UsersTrackPostBodyNormalizer.php @@ -66,26 +66,30 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (\array_key_exists('events', $data)) { $values_2 = []; foreach ($data['events'] as $value_2) { - $values_2[] = $value_2; + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; } $object->setEvents($values_2); unset($data['events']); } if (\array_key_exists('purchases', $data)) { - $values_3 = []; - foreach ($data['purchases'] as $value_3) { - $values_4 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value_3 as $key_1 => $value_4) { - $values_4[$key_1] = $value_4; + $values_4 = []; + foreach ($data['purchases'] as $value_4) { + $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_4 as $key_2 => $value_5) { + $values_5[$key_2] = $value_5; } - $values_3[] = $values_4; + $values_4[] = $values_5; } - $object->setPurchases($values_3); + $object->setPurchases($values_4); unset($data['purchases']); } - foreach ($data as $key_2 => $value_5) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_5; + foreach ($data as $key_3 => $value_6) { + if (preg_match('/.*/', (string) $key_3)) { + $object[$key_3] = $value_6; } } @@ -109,24 +113,28 @@ public function normalize(mixed $object, ?string $format = null, array $context if ($object->isInitialized('events') && null !== $object->getEvents()) { $values_2 = []; foreach ($object->getEvents() as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; } $data['events'] = $values_2; } if ($object->isInitialized('purchases') && null !== $object->getPurchases()) { - $values_3 = []; - foreach ($object->getPurchases() as $value_3) { - $values_4 = []; - foreach ($value_3 as $key_1 => $value_4) { - $values_4[$key_1] = $value_4; + $values_4 = []; + foreach ($object->getPurchases() as $value_4) { + $values_5 = []; + foreach ($value_4 as $key_2 => $value_5) { + $values_5[$key_2] = $value_5; } - $values_3[] = $values_4; + $values_4[] = $values_5; } - $data['purchases'] = $values_3; + $data['purchases'] = $values_4; } - foreach ($object as $key_2 => $value_5) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_5; + foreach ($object as $key_3 => $value_6) { + if (preg_match('/.*/', (string) $key_3)) { + $data[$key_3] = $value_6; } } @@ -183,26 +191,30 @@ public function denormalize($data, $type, $format = null, array $context = []) if (\array_key_exists('events', $data)) { $values_2 = []; foreach ($data['events'] as $value_2) { - $values_2[] = $value_2; + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; } $object->setEvents($values_2); unset($data['events']); } if (\array_key_exists('purchases', $data)) { - $values_3 = []; - foreach ($data['purchases'] as $value_3) { - $values_4 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value_3 as $key_1 => $value_4) { - $values_4[$key_1] = $value_4; + $values_4 = []; + foreach ($data['purchases'] as $value_4) { + $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_4 as $key_2 => $value_5) { + $values_5[$key_2] = $value_5; } - $values_3[] = $values_4; + $values_4[] = $values_5; } - $object->setPurchases($values_3); + $object->setPurchases($values_4); unset($data['purchases']); } - foreach ($data as $key_2 => $value_5) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_5; + foreach ($data as $key_3 => $value_6) { + if (preg_match('/.*/', (string) $key_3)) { + $object[$key_3] = $value_6; } } @@ -229,24 +241,28 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('events') && null !== $object->getEvents()) { $values_2 = []; foreach ($object->getEvents() as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; } $data['events'] = $values_2; } if ($object->isInitialized('purchases') && null !== $object->getPurchases()) { - $values_3 = []; - foreach ($object->getPurchases() as $value_3) { - $values_4 = []; - foreach ($value_3 as $key_1 => $value_4) { - $values_4[$key_1] = $value_4; + $values_4 = []; + foreach ($object->getPurchases() as $value_4) { + $values_5 = []; + foreach ($value_4 as $key_2 => $value_5) { + $values_5[$key_2] = $value_5; } - $values_3[] = $values_4; + $values_4[] = $values_5; } - $data['purchases'] = $values_3; + $data['purchases'] = $values_4; } - foreach ($object as $key_2 => $value_5) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_5; + foreach ($object as $key_3 => $value_6) { + if (preg_match('/.*/', (string) $key_3)) { + $data[$key_3] = $value_6; } }