summaryrefslogtreecommitdiffstats
path: root/Core/Authentication/Token
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2011-12-18 14:48:17 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2011-12-18 14:48:17 +0100
commitc65b37ce9b93a1bbfc6f33a41e834ff080d24c0f (patch)
tree2f22d35b8b615c348b29b64f8707435d2d306db9 /Core/Authentication/Token
parent60fe04c4834d8a734b2902ceddf7bbe2ac3d0bcd (diff)
parent1df44a7f54710ec4f270e7398bf1908af8f8ada8 (diff)
downloadsymfony-security-c65b37ce9b93a1bbfc6f33a41e834ff080d24c0f.zip
symfony-security-c65b37ce9b93a1bbfc6f33a41e834ff080d24c0f.tar.gz
symfony-security-c65b37ce9b93a1bbfc6f33a41e834ff080d24c0f.tar.bz2
merged 2.0
Diffstat (limited to 'Core/Authentication/Token')
-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 ee6b207..dc21684 100644
--- a/Core/Authentication/Token/AbstractToken.php
+++ b/Core/Authentication/Token/AbstractToken.php
@@ -42,7 +42,7 @@ abstract class AbstractToken implements TokenInterface
foreach ($roles as $role) {
if (is_string($role)) {
$role = new Role($role);
- } else if (!$role instanceof RoleInterface) {
+ } elseif (!$role instanceof RoleInterface) {
throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, or RoleInterface instances, but got %s.', gettype($role)));
}
@@ -83,13 +83,13 @@ abstract class AbstractToken implements TokenInterface
if (null === $this->user) {
$changed = false;
- } else if ($this->user instanceof UserInterface) {
+ } elseif ($this->user instanceof UserInterface) {
if (!$user instanceof UserInterface) {
$changed = true;
} else {
$changed = !$this->user->equals($user);
}
- } else if ($user instanceof UserInterface) {
+ } elseif ($user instanceof UserInterface) {
$changed = true;
} else {
$changed = (string) $this->user !== (string) $user;