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