summaryrefslogtreecommitdiffstats
path: root/Core/Authentication
diff options
context:
space:
mode:
authorDariusz Górecki <darek.krk@gmail.com>2012-01-02 12:36:42 +0100
committerDariusz Górecki <darek.krk@gmail.com>2012-01-10 21:55:05 +0100
commite525c966a0d63d754aff6cf315a48aca90c89e02 (patch)
tree651cd82d034eb8ddbd8114038f86c2db48fa66de /Core/Authentication
parentf8e84db6faa5154d77b31cb3224024668793d1f4 (diff)
downloadsymfony-security-e525c966a0d63d754aff6cf315a48aca90c89e02.zip
symfony-security-e525c966a0d63d754aff6cf315a48aca90c89e02.tar.gz
symfony-security-e525c966a0d63d754aff6cf315a48aca90c89e02.tar.bz2
Refactor `isUserChanged` to `hasUserChanged`
Diffstat (limited to 'Core/Authentication')
-rw-r--r--Core/Authentication/Token/AbstractToken.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php
index 7dcdf42..8a9b4e4 100644
--- a/Core/Authentication/Token/AbstractToken.php
+++ b/Core/Authentication/Token/AbstractToken.php
@@ -89,7 +89,7 @@ abstract class AbstractToken implements TokenInterface
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 @@ abstract class AbstractToken implements TokenInterface
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) {