if (!
$this->container->
getParameterBag()->
all()) { return '';
} $php =
[];
$dynamicPhp =
[];
foreach ($this->container->
getParameterBag()->
all() as $key =>
$value) { if ($key !==
$resolvedKey =
$this->container->
resolveEnvPlaceholders($key)) { throw new InvalidArgumentException(sprintf('Parameter name cannot use env parameters: "%s".',
$resolvedKey));
} $export =
$this->
exportParameters([$value]);
$export =
explode('0 => ',
substr(rtrim($export, " ]\n"
), 2, -1
), 2
);
if (preg_match("/\\\$this->(?:getEnv\('(?:[-.\w]*+:)*+\w++'\)|targetDir\.'')/",
$export[1
])) { $dynamicPhp[$key] =
sprintf('%scase %s: $value = %s; break;',
$export[0
],
$this->
export($key),
$export[1
]);
} else { $php[] =
sprintf('%s%s => %s,',
$export[0
],
$this->
export($key),
$export[1
]);
} } $parameters =
sprintf("[\n%s\n%s]",
implode("\n",
$php),
str_repeat(' ', 8
));
$code = <<<'EOF'