[Validator] Some cleanup of the GraphWalker
This commit is contained in:
parent
23e15bb878
commit
ead4908eff
@ -91,13 +91,9 @@ class GraphWalker
|
||||
$hash = spl_object_hash($object);
|
||||
|
||||
// Exit, if the object is already validated for the current group
|
||||
if (isset($this->validatedObjects[$hash])) {
|
||||
if (isset($this->validatedObjects[$hash][$group])) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
$this->validatedObjects[$hash] = array();
|
||||
}
|
||||
|
||||
// Remember validating this object before starting and possibly
|
||||
// traversing the object graph
|
||||
@ -110,10 +106,9 @@ class GraphWalker
|
||||
}
|
||||
|
||||
if (null !== $object) {
|
||||
$pathPrefix = empty($propertyPath) ? '' : $propertyPath.'.';
|
||||
foreach ($metadata->getConstrainedProperties() as $property) {
|
||||
$localPropertyPath = empty($propertyPath) ? $property : $propertyPath.'.'.$property;
|
||||
|
||||
$this->walkProperty($metadata, $property, $object, $group, $localPropertyPath, $propagatedGroup);
|
||||
$this->walkProperty($metadata, $property, $object, $group, $pathPrefix.$property, $propagatedGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user