MCPcopy Create free account
hub / github.com/Rello/analytics / descriptor

Method descriptor

lib/Service/FlexibleStorageService.php:1171–1183  ·  view source on GitHub ↗

@return array */

(array $dataset, array $columns)

Source from the content-addressed store, hash-verified

1169
1170 /** @return array<string,mixed> */
1171 private function descriptor(array $dataset, array $columns): array {
1172 return [
1173 'id' => (int)$dataset['id'],
1174 'name' => (string)$dataset['name'],
1175 'subheader' => $dataset['subheader'] ?? null,
1176 'type' => isset($dataset['type']) ? (int)$dataset['type'] : 2,
1177 'parent' => isset($dataset['parent']) ? (int)$dataset['parent'] : 0,
1178 'aiIndex' => isset($dataset['ai_index']) ? (int)$dataset['ai_index'] : 0,
1179 'storageMode' => DatasetStorageResolver::FLEXIBLE_SHARED,
1180 'schemaVersion' => (int)($dataset['schema_version'] ?? 1),
1181 'columns' => array_values($columns),
1182 ];
1183 }
1184
1185 /** @return array<string,mixed> */
1186 private function decodeMapping(mixed $mapping): array {

Callers 2

createDatasetMethod · 0.95
getDescriptorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected