prefixPathsWithBasePath($configKey, $config, $basePath); } return $config; } private function prefixPathsWithBasePath(string $configKey, array $config, string $basePath): array { return map($config[$configKey] ?? [], function (array $element) use ($basePath) { if (! isset($element['path'])) { return $element; } $element['path'] = $basePath . $element['path']; return $element; }); } }