protected function stringToType($config)
    {
        list($typeName, $properties) = $this->splitTypeAndProperties($config);

        $type = $this->createType($typeName);

        if ($properties) {
            $type->fill($this->parseProperties($properties));
        }

        if (!$type instanceof ObjectType) {
            return $type;
        }

        if (!$type->hasKeyProvider()) {
            $type->provideKeysBy($this->buildKeyProvider($type));
        }

        return $type;
    }