* Ensures the paths array has at least $minCount elements, padding with $fill if needed. */
(array $fields, int $minCount, string $fill)
| 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. |