Skip to content

Commit bcff810

Browse files
committed
Fix style
1 parent 454abed commit bcff810

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

src/Subscription/Serializer/AttributeDefinitionNormalizer.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,11 @@ public function normalize($object, string $format = null, array $context = []):
2222
$options = $object->getOptions();
2323
if (!empty($options)) {
2424
$options = array_map(function ($option) {
25-
if ($option instanceof DynamicListAttrDto) {
26-
return [
27-
'id' => $option->id,
28-
'name' => $option->name,
29-
'list_order' => $option->listOrder,
30-
];
31-
}
32-
return $option;
25+
return [
26+
'id' => $option->id,
27+
'name' => $option->name,
28+
'list_order' => $option->listOrder,
29+
];
3330
}, $options);
3431
}
3532

tests/Unit/Subscription/Serializer/AttributeDefinitionNormalizerTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,12 @@ public function testNormalizeWithOptions(): void
9797
'id' => 10,
9898
'name' => 'USA',
9999
'list_order' => 1,
100-
],
101-
[
100+
], [
102101
'id' => 20,
103102
'name' => 'Canada',
104103
'list_order' => 2,
105104
],
106105
],
107106
], $result);
108107
}
109-
110108
}

0 commit comments

Comments
 (0)