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

Method descriptor

lib/Service/FlexibleStorageService.php:1174–1186  ·  view source on GitHub ↗

@return array */

(array $dataset, array $columns)

Source from the content-addressed store, hash-verified

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

Callers 2

createDatasetMethod · 0.95
getDescriptorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected