protected function adjustShadowNodePath(NodeData $shadowNodeData, $path, Workspace $targetWorkspace, array $dimensionValues)
{
$nodeOnSamePathInTargetWorkspace = $this->nodeDataRepository->findOneByPath($path, $targetWorkspace, $dimensionValues);
if ($nodeOnSamePathInTargetWorkspace === null || $nodeOnSamePathInTargetWorkspace->getWorkspace() !== $targetWorkspace) {
$shadowNodeData->setPath($path, false);
return;
}
// A node exists in that path, so no shadow node is needed/possible.
$this->nodeDataRepository->remove($shadowNodeData);
}