diff options
author | Dariusz Górecki <darek.krk@gmail.com> | 2012-01-02 13:04:18 +0100 |
---|---|---|
committer | Dariusz Górecki <darek.krk@gmail.com> | 2012-01-10 21:55:05 +0100 |
commit | 137afdde3ab3c30b109ae33ee50542486e743d74 (patch) | |
tree | 47c5440f0777bc34dd17b9569a0fe5c904f017b1 /Core/Authentication | |
parent | e84f0b6383c3310964a7d870b84b91f1ee7bcc79 (diff) | |
download | symfony-security-137afdde3ab3c30b109ae33ee50542486e743d74.zip symfony-security-137afdde3ab3c30b109ae33ee50542486e743d74.tar.gz symfony-security-137afdde3ab3c30b109ae33ee50542486e743d74.tar.bz2 |
When method name is `hasUserChanged` the return boolean should be true (to match question semantics) and false when user has not changed, this commits inverts return statements.
Diffstat (limited to 'Core/Authentication')
-rw-r--r-- | Core/Authentication/Token/AbstractToken.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php index 8a9b4e4..f83b5d9 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->hasUserChanged($user); + $changed = $this->hasUserChanged($user); } } elseif ($user instanceof UserInterface) { $changed = true; @@ -230,41 +230,41 @@ abstract class AbstractToken implements TokenInterface } if ($this->user instanceof EquatableInterface) { - return $this->user->isEqualTo($user); + return !$this->user->isEqualTo($user); } if ($this->user->getPassword() !== $user->getPassword()) { - return false; + return true; } if ($this->user->getSalt() !== $user->getSalt()) { - return false; + return true; } if ($this->user->getUsername() !== $user->getUsername()) { - return false; + return true; } if ($this->user instanceof AdvancedUserInterface && $user instanceof AdvancedUserInterface) { if ($this->user->isAccountNonExpired() !== $user->isAccountNonExpired()) { - return false; + return true; } if ($this->user->isAccountNonLocked() !== $user->isAccountNonLocked()) { - return false; + return true; } if ($this->user->isCredentialsNonExpired() !== $user->isCredentialsNonExpired()) { - return false; + return true; } if ($this->user->isEnabled() !== $user->isEnabled()) { - return false; + return true; } } elseif ($this->user instanceof AdvancedUserInterface xor $user instanceof AdvancedUserInterface) { - return false; + return true; } - return true; + return false; } } |