@return array */
(array $dataset, array $columns)
| 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 { |
no outgoing calls
no test coverage detected