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

Method normalizePaths

lib/Datasource/ExternalJson.php:224–230  ·  view source on GitHub ↗

* Ensures the paths array has at least $minCount elements, padding with $fill if needed. */

(array $fields, int $minCount, string $fill)

Source from the content-addressed store, hash-verified

222 * Ensures the paths array has at least $minCount elements, padding with $fill if needed.
223 */
224 private function normalizePaths(array $fields, int $minCount, string $fill): array {
225 $paths = array_map('trim', explode(',', $fields[0]));
226 while (count($paths) < $minCount) {
227 array_unshift($paths, $fill);
228 }
229 return $paths;
230 }
231
232 /**
233 * Extracts rows from an array of arrays, using the provided paths.

Callers 1

jsonParserMethod · 0.95

Calls 1

countFunction · 0.50

Tested by

no test coverage detected