Skip to content

Commit 520a189

Browse files
Ridflavioheleno
authored andcommitted
Fix objects which should be arrayObjects
Signed-off-by: Grant Millar <[email protected]>
1 parent eda01f4 commit 520a189

File tree

95 files changed

+282
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+282
-295
lines changed

patches/ContainersCreatePostBodyNormalizer.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/Normalizer/BuildInfoNormalizer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function normalize($object, $format = null, array $context = [])
119119
$data['error'] = $object->getError();
120120
}
121121
if ($object->isInitialized('errorDetail') && null !== $object->getErrorDetail()) {
122-
$data['errorDetail'] = $this->normalizer->normalize($object->getErrorDetail(), 'json', $context);
122+
$data['errorDetail'] = new \ArrayObject($this->normalizer->normalize($object->getErrorDetail(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
123123
}
124124
if ($object->isInitialized('status') && null !== $object->getStatus()) {
125125
$data['status'] = $object->getStatus();
@@ -128,10 +128,10 @@ public function normalize($object, $format = null, array $context = [])
128128
$data['progress'] = $object->getProgress();
129129
}
130130
if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) {
131-
$data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context);
131+
$data['progressDetail'] = new \ArrayObject($this->normalizer->normalize($object->getProgressDetail(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
132132
}
133133
if ($object->isInitialized('aux') && null !== $object->getAux()) {
134-
$data['aux'] = $this->normalizer->normalize($object->getAux(), 'json', $context);
134+
$data['aux'] = new \ArrayObject($this->normalizer->normalize($object->getAux(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
135135
}
136136
foreach ($object as $key => $value) {
137137
if (preg_match('/.*/', (string) $key)) {

src/Normalizer/ClusterInfoNormalizer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function normalize($object, $format = null, array $context = [])
129129
$data['ID'] = $object->getID();
130130
}
131131
if ($object->isInitialized('version') && null !== $object->getVersion()) {
132-
$data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context);
132+
$data['Version'] = new \ArrayObject($this->normalizer->normalize($object->getVersion(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
133133
}
134134
if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
135135
$data['CreatedAt'] = $object->getCreatedAt();
@@ -138,10 +138,10 @@ public function normalize($object, $format = null, array $context = [])
138138
$data['UpdatedAt'] = $object->getUpdatedAt();
139139
}
140140
if ($object->isInitialized('spec') && null !== $object->getSpec()) {
141-
$data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context);
141+
$data['Spec'] = new \ArrayObject($this->normalizer->normalize($object->getSpec(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
142142
}
143143
if ($object->isInitialized('tLSInfo') && null !== $object->getTLSInfo()) {
144-
$data['TLSInfo'] = $this->normalizer->normalize($object->getTLSInfo(), 'json', $context);
144+
$data['TLSInfo'] = new \ArrayObject($this->normalizer->normalize($object->getTLSInfo(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
145145
}
146146
if ($object->isInitialized('rootRotationInProgress') && null !== $object->getRootRotationInProgress()) {
147147
$data['RootRotationInProgress'] = $object->getRootRotationInProgress();

src/Normalizer/ConfigNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function normalize($object, $format = null, array $context = [])
9595
$data['ID'] = $object->getID();
9696
}
9797
if ($object->isInitialized('version') && null !== $object->getVersion()) {
98-
$data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context);
98+
$data['Version'] = new \ArrayObject($this->normalizer->normalize($object->getVersion(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
9999
}
100100
if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
101101
$data['CreatedAt'] = $object->getCreatedAt();
@@ -104,7 +104,7 @@ public function normalize($object, $format = null, array $context = [])
104104
$data['UpdatedAt'] = $object->getUpdatedAt();
105105
}
106106
if ($object->isInitialized('spec') && null !== $object->getSpec()) {
107-
$data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context);
107+
$data['Spec'] = new \ArrayObject($this->normalizer->normalize($object->getSpec(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
108108
}
109109
foreach ($object as $key => $value) {
110110
if (preg_match('/.*/', (string) $key)) {

src/Normalizer/ConfigSpecNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function normalize($object, $format = null, array $context = [])
9393
$data['Name'] = $object->getName();
9494
}
9595
if ($object->isInitialized('labels') && null !== $object->getLabels()) {
96-
$values = [];
96+
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
9797
foreach ($object->getLabels() as $key => $value) {
9898
$values[$key] = $value;
9999
}
@@ -103,7 +103,7 @@ public function normalize($object, $format = null, array $context = [])
103103
$data['Data'] = $object->getData();
104104
}
105105
if ($object->isInitialized('templating') && null !== $object->getTemplating()) {
106-
$data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context);
106+
$data['Templating'] = new \ArrayObject($this->normalizer->normalize($object->getTemplating(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
107107
}
108108
foreach ($object as $key_1 => $value_1) {
109109
if (preg_match('/.*/', (string) $key_1)) {

src/Normalizer/ConfigsCreatePostBodyNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function normalize($object, $format = null, array $context = [])
9393
$data['Name'] = $object->getName();
9494
}
9595
if ($object->isInitialized('labels') && null !== $object->getLabels()) {
96-
$values = [];
96+
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
9797
foreach ($object->getLabels() as $key => $value) {
9898
$values[$key] = $value;
9999
}
@@ -103,7 +103,7 @@ public function normalize($object, $format = null, array $context = [])
103103
$data['Data'] = $object->getData();
104104
}
105105
if ($object->isInitialized('templating') && null !== $object->getTemplating()) {
106-
$data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context);
106+
$data['Templating'] = new \ArrayObject($this->normalizer->normalize($object->getTemplating(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
107107
}
108108
foreach ($object as $key_1 => $value_1) {
109109
if (preg_match('/.*/', (string) $key_1)) {

src/Normalizer/ContainerConfigNormalizer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ public function normalize($object, $format = null, array $context = [])
262262
$data['AttachStderr'] = $object->getAttachStderr();
263263
}
264264
if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) {
265-
$values = [];
265+
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
266266
foreach ($object->getExposedPorts() as $key => $value) {
267-
$values[$key] = $this->normalizer->normalize($value, 'json', $context);
267+
$values[$key] = new \ArrayObject($this->normalizer->normalize($value, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
268268
}
269269
$data['ExposedPorts'] = $values;
270270
}
@@ -292,7 +292,7 @@ public function normalize($object, $format = null, array $context = [])
292292
$data['Cmd'] = $values_2;
293293
}
294294
if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) {
295-
$data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context);
295+
$data['Healthcheck'] = new \ArrayObject($this->normalizer->normalize($object->getHealthcheck(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
296296
}
297297
if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) {
298298
$data['ArgsEscaped'] = $object->getArgsEscaped();
@@ -301,9 +301,9 @@ public function normalize($object, $format = null, array $context = [])
301301
$data['Image'] = $object->getImage();
302302
}
303303
if ($object->isInitialized('volumes') && null !== $object->getVolumes()) {
304-
$values_3 = [];
304+
$values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
305305
foreach ($object->getVolumes() as $key_1 => $value_3) {
306-
$values_3[$key_1] = $this->normalizer->normalize($value_3, 'json', $context);
306+
$values_3[$key_1] = new \ArrayObject($this->normalizer->normalize($value_3, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
307307
}
308308
$data['Volumes'] = $values_3;
309309
}
@@ -331,7 +331,7 @@ public function normalize($object, $format = null, array $context = [])
331331
$data['OnBuild'] = $values_5;
332332
}
333333
if ($object->isInitialized('labels') && null !== $object->getLabels()) {
334-
$values_6 = [];
334+
$values_6 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
335335
foreach ($object->getLabels() as $key_2 => $value_6) {
336336
$values_6[$key_2] = $value_6;
337337
}

src/Normalizer/ContainerStateNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function normalize($object, $format = null, array $context = [])
167167
$data['FinishedAt'] = $object->getFinishedAt();
168168
}
169169
if ($object->isInitialized('health') && null !== $object->getHealth()) {
170-
$data['Health'] = $this->normalizer->normalize($object->getHealth(), 'json', $context);
170+
$data['Health'] = new \ArrayObject($this->normalizer->normalize($object->getHealth(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
171171
}
172172
foreach ($object as $key => $value) {
173173
if (preg_match('/.*/', (string) $key)) {

src/Normalizer/ContainerSummaryItemNetworkSettingsNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ public function normalize($object, $format = null, array $context = [])
7272
{
7373
$data = [];
7474
if ($object->isInitialized('networks') && null !== $object->getNetworks()) {
75-
$values = [];
75+
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
7676
foreach ($object->getNetworks() as $key => $value) {
77-
$values[$key] = $this->normalizer->normalize($value, 'json', $context);
77+
$values[$key] = new \ArrayObject($this->normalizer->normalize($value, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
7878
}
7979
$data['Networks'] = $values;
8080
}

src/Normalizer/ContainerSummaryItemNormalizer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function normalize($object, $format = null, array $context = [])
192192
if ($object->isInitialized('ports') && null !== $object->getPorts()) {
193193
$values_1 = [];
194194
foreach ($object->getPorts() as $value_1) {
195-
$values_1[] = $this->normalizer->normalize($value_1, 'json', $context);
195+
$values_1[] = new \ArrayObject($this->normalizer->normalize($value_1, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
196196
}
197197
$data['Ports'] = $values_1;
198198
}
@@ -203,7 +203,7 @@ public function normalize($object, $format = null, array $context = [])
203203
$data['SizeRootFs'] = $object->getSizeRootFs();
204204
}
205205
if ($object->isInitialized('labels') && null !== $object->getLabels()) {
206-
$values_2 = [];
206+
$values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
207207
foreach ($object->getLabels() as $key => $value_2) {
208208
$values_2[$key] = $value_2;
209209
}
@@ -216,15 +216,15 @@ public function normalize($object, $format = null, array $context = [])
216216
$data['Status'] = $object->getStatus();
217217
}
218218
if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) {
219-
$data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context);
219+
$data['HostConfig'] = new \ArrayObject($this->normalizer->normalize($object->getHostConfig(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
220220
}
221221
if ($object->isInitialized('networkSettings') && null !== $object->getNetworkSettings()) {
222-
$data['NetworkSettings'] = $this->normalizer->normalize($object->getNetworkSettings(), 'json', $context);
222+
$data['NetworkSettings'] = new \ArrayObject($this->normalizer->normalize($object->getNetworkSettings(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
223223
}
224224
if ($object->isInitialized('mounts') && null !== $object->getMounts()) {
225225
$values_3 = [];
226226
foreach ($object->getMounts() as $value_3) {
227-
$values_3[] = $this->normalizer->normalize($value_3, 'json', $context);
227+
$values_3[] = new \ArrayObject($this->normalizer->normalize($value_3, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
228228
}
229229
$data['Mounts'] = $values_3;
230230
}

0 commit comments

Comments
 (0)