Skip to content

Commit 8d58892

Browse files
Merge pull request #172 from ischenko/patch-1
Simplified an expression for alias resolution
2 parents 77480b5 + dc855e2 commit 8d58892

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/JsonSchema/Schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function normalizeObject($subject, array $aliases): \stdClass
3434
$out = new \stdClass;
3535

3636
foreach ($this->body->properties as $propertyName => $property) {
37-
$name = ((array)($aliases[$propertyName] ?? $propertyName))[0];
37+
$name = $aliases[$propertyName] ?? $propertyName;
3838

3939
if (isset($property->readOnly) && $property->readOnly === true) {
4040
continue;

0 commit comments

Comments
 (0)