made ExecutionContext more consistent

This commit is contained in:
Tobias Schultze 2012-12-03 19:34:26 +01:00
parent cc53fc25b5
commit 3d0c70e434
2 changed files with 3 additions and 3 deletions

View File

@ -172,9 +172,9 @@ class ExecutionContext implements ExecutionContextInterface
/**
* {@inheritdoc}
*/
public function getPropertyPath($subPath = null)
public function getPropertyPath($subPath = '')
{
if (null !== $subPath && '' !== $this->propertyPath && '' !== $subPath && '[' !== $subPath[0]) {
if ('' != $subPath && '' !== $this->propertyPath && '[' !== $subPath[0]) {
return $this->propertyPath . '.' . $subPath;
}

View File

@ -300,5 +300,5 @@ interface ExecutionContextInterface
* string if the validator is currently validating the
* root value of the validation graph.
*/
public function getPropertyPath($subPath = null);
public function getPropertyPath($subPath = '');
}