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

Method normalizePaths

lib/Datasource/LocalJson.php:184–190  ·  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

182 * Ensures the paths array has at least $minCount elements, padding with $fill if needed.
183 */
184 private function normalizePaths(array $fields, int $minCount, string $fill): array {
185 $paths = array_map('trim', explode(',', $fields[0]));
186 while (count($paths) < $minCount) {
187 array_unshift($paths, $fill);
188 }
189 return $paths;
190 }
191
192 /**
193 * 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