From 3d0c70e434926211dec019c48365ba169dd585dc Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Mon, 3 Dec 2012 19:34:26 +0100 Subject: [PATCH] made ExecutionContext more consistent --- src/Symfony/Component/Validator/ExecutionContext.php | 4 ++-- src/Symfony/Component/Validator/ExecutionContextInterface.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Validator/ExecutionContext.php b/src/Symfony/Component/Validator/ExecutionContext.php index af9b2e6b32..75fe059dbb 100644 --- a/src/Symfony/Component/Validator/ExecutionContext.php +++ b/src/Symfony/Component/Validator/ExecutionContext.php @@ -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; } diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index cae91a99b4..1d065c888c 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -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 = ''); }