src/Mapper/ContentType.php
public function map($resource, array $data): ResourceClass
    {
        $fields = [];
        foreach ($data['fields'] as $field) {
            $field = $this->mapField($field);
            $fields[$field->getId()] = $field;
        }

        /** @var ResourceClass $contentType */
        $contentType = $this->hydrator->hydrate($resource ?: ResourceClass::class, [
            'sys' => $this->createSystemProperties(SystemProperties::class, $data),
            'name' => $data['name'],
            'displayField' => $data['displayField'] ?? null,
            'description' => $data['description'] ?? null,
            'fields' => $fields,
        ]);

        return $contentType;
    }
public function map($resource, array $data): ResourceClass
    {
        $fields = [];
        foreach ($data['fields'] as $field) {
            $field = $this->mapField($field);
            $fields[$field->getId()] = $field;
        }

        /** @var ResourceClass $contentType */
        $contentType = $this->hydrator->hydrate($resource ?: ResourceClass::class, [
            'sys' => $this->createSystemProperties(SystemProperties::class, $data),
            'name' => $data['name'],
            'displayField' => $data['displayField'] ?? null,
            'description' => $data['description'] ?? null,
            'fields' => $fields,
        ]);

        return $contentType;
    }
{@inheritdoc}