From 3682f62a07c5b632de95c80ec290cfed2c58f92b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20G=C3=B3recki?= Date: Mon, 2 Jan 2012 12:36:42 +0100 Subject: [PATCH] Refactor `isUserChanged` to `hasUserChanged` --- .../Security/Core/Authentication/Token/AbstractToken.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php index 7dcdf4200367..8a9b4e4ebc6c 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php @@ -89,7 +89,7 @@ public function setUser($user) if (!$user instanceof UserInterface) { $changed = true; } else { - $changed = !$this->isUserChanged($user); + $changed = !$this->hasUserChanged($user); } } elseif ($user instanceof UserInterface) { $changed = true; @@ -223,10 +223,10 @@ public function __toString() return sprintf('%s(user="%s", authenticated=%s, roles="%s")', $class, $this->getUsername(), json_encode($this->authenticated), implode(', ', $roles)); } - private function isUserChanged(UserInterface $user) + private function hasUserChanged(UserInterface $user) { if (!($this->user instanceof UserInterface)) { - throw new \BadMethodCallException('Method "compareUser" should be called when current user class is instance of "UserInterface".'); + throw new \BadMethodCallException('Method "hasUserChanged" should be called when current user class is instance of "UserInterface".'); } if ($this->user instanceof EquatableInterface) {