Updates argument references.
array $arguments An array of Arguments:
string $currentId The alias identifier:
string $newId The identifier the alias points to:
array
private function updateArgumentReferences(array $arguments, $currentId, $newId) {
foreach ($arguments as $k => $argument) {
if (is_array($argument)) {
$arguments[$k] = $this
->updateArgumentReferences($argument, $currentId, $newId);
}
elseif ($argument instanceof Reference) {
if ($currentId === (string) $argument) {
$arguments[$k] = new Reference($newId, $argument
->getInvalidBehavior());
$this->compiler
->addLogMessage($this->formatter
->formatUpdateReference($this, $this->sourceId, $currentId, $newId));
}
}
}
return $arguments;
}