// the children of scope. If it cannot, the error will be
// mapped to this scope.
$scope = null;
$violationPath = null;
$relativePath = null;
$match = false;
// Don't create a ViolationPath instance for empty property paths
if ('' !==
$violation->
getPropertyPath()) { $violationPath =
new ViolationPath($violation->
getPropertyPath());
$relativePath =
$this->
reconstructPath($violationPath,
$form);
} // This case happens if the violation path is empty and thus
// the violation should be mapped to the root form
if (null ===
$violationPath) { $scope =
$form;
} // In general, mapping happens from the root form to the leaf forms
// First, the rules of the root form are applied to determine
// the subsequent descendant. The rules of this descendant are then