merged branch vicb/minor_cleanup (PR #4430)
Commits -------59c4f55
a few minor changes Discussion ---------- a few minor changes / cleanup --------------------------------------------------------------------------- by travisbot at 2012-05-27T07:58:52Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1446431) (merged bb7ae326 into9e951991
).
This commit is contained in:
commit
3273d5189e
@ -47,18 +47,17 @@ class FormValidator extends ConstraintValidator
|
||||
}
|
||||
|
||||
/* @var FormInterface $form */
|
||||
|
||||
$path = $this->context->getPropertyPath();
|
||||
$graphWalker = $this->context->getGraphWalker();
|
||||
$groups = $this->getValidationGroups($form);
|
||||
$config = $form->getConfig();
|
||||
|
||||
if (!empty($path)) {
|
||||
$path .= '.';
|
||||
}
|
||||
|
||||
if ($form->isSynchronized()) {
|
||||
// Validate the form data only if transformation succeeded
|
||||
$path = $this->context->getPropertyPath();
|
||||
$graphWalker = $this->context->getGraphWalker();
|
||||
$groups = $this->getValidationGroups($form);
|
||||
|
||||
if (!empty($path)) {
|
||||
$path .= '.';
|
||||
}
|
||||
|
||||
// Validate the data against its own constraints
|
||||
if (self::allowDataWalking($form)) {
|
||||
|
@ -58,7 +58,7 @@ class MappingRule
|
||||
*
|
||||
* @param string $propertyPath The property path to match against the rule.
|
||||
*
|
||||
* @return Boolean|FormInterface The mapped form or false.
|
||||
* @return null|FormInterface The mapped form or null.
|
||||
*/
|
||||
public function match($propertyPath)
|
||||
{
|
||||
@ -66,7 +66,7 @@ class MappingRule
|
||||
return $this->getTarget();
|
||||
}
|
||||
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -176,7 +176,7 @@ class ViolationMapper implements ViolationMapperInterface
|
||||
/* @var MappingRule $rule */
|
||||
|
||||
// Mapping rule matches completely, terminate.
|
||||
if (false !== ($form = $rule->match($chunk))) {
|
||||
if (null !== ($form = $rule->match($chunk))) {
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user