From 230f2a72fab5d0ad92eafc846bdb504827379020 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Wed, 19 Feb 2014 20:36:09 +0100 Subject: [PATCH] [Validator] Fixed exception message --- .../Component/Validator/NodeVisitor/ContextRefresher.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Validator/NodeVisitor/ContextRefresher.php b/src/Symfony/Component/Validator/NodeVisitor/ContextRefresher.php index 56e8549942..3166d38285 100644 --- a/src/Symfony/Component/Validator/NodeVisitor/ContextRefresher.php +++ b/src/Symfony/Component/Validator/NodeVisitor/ContextRefresher.php @@ -30,7 +30,7 @@ class ContextRefresher extends AbstractVisitor if (!$context instanceof NodeStackInterface) { throw new RuntimeException(sprintf( 'The ContextRefresher only supports instances of class '. - '"Symfony\Component\Validator\Context\ExecutionContext". '. + '"Symfony\Component\Validator\Context\NodeStackInterface". '. 'An instance of class "%s" was given.', get_class($context) )); @@ -39,17 +39,12 @@ class ContextRefresher extends AbstractVisitor $context->pushNode($node); } - /** - * {@inheritdoc} - * - * @throws RuntimeException If {@link initialize()} wasn't called - */ public function leaveNode(Node $node, ExecutionContextInterface $context) { if (!$context instanceof NodeStackInterface) { throw new RuntimeException(sprintf( 'The ContextRefresher only supports instances of class '. - '"Symfony\Component\Validator\Context\ExecutionContext". '. + '"Symfony\Component\Validator\Context\NodeStackInterface". '. 'An instance of class "%s" was given.', get_class($context) ));