summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2011-12-13 08:50:54 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2011-12-13 10:22:12 +0100
commitd62274e7daa62c8dd1e2f772e108a773ca043a69 (patch)
tree66dcd95987e267e83cba9b51b7925255e4a8601d
parentd2bdba5c73733dbc45153658584f16b57126090c (diff)
downloadsymfony-security-d62274e7daa62c8dd1e2f772e108a773ca043a69.zip
symfony-security-d62274e7daa62c8dd1e2f772e108a773ca043a69.tar.gz
symfony-security-d62274e7daa62c8dd1e2f772e108a773ca043a69.tar.bz2
[DoctrineBridge] fixed some CS
-rw-r--r--Acl/Dbal/AclProvider.php7
-rw-r--r--Acl/Domain/Acl.php2
-rw-r--r--Core/Authentication/RememberMe/TokenProviderInterface.php11
-rw-r--r--Core/Authentication/Token/RememberMeToken.php3
-rw-r--r--Core/Encoder/EncoderFactory.php1
-rw-r--r--Core/Encoder/EncoderFactoryInterface.php3
-rw-r--r--Core/SecurityContext.php2
-rw-r--r--Core/SecurityContextInterface.php2
-rw-r--r--Core/User/UserInterface.php1
-rw-r--r--Http/Firewall/ContextListener.php2
-rw-r--r--Http/Firewall/LogoutListener.php1
-rw-r--r--Http/FirewallMapInterface.php1
-rw-r--r--Http/Logout/CookieClearingLogoutHandler.php4
-rw-r--r--Http/Logout/LogoutHandlerInterface.php1
-rw-r--r--Http/Logout/LogoutSuccessHandlerInterface.php1
-rw-r--r--Http/Logout/SessionLogoutHandler.php1
-rw-r--r--Http/RememberMe/AbstractRememberMeServices.php10
-rw-r--r--Http/RememberMe/PersistentTokenBasedRememberMeServices.php1
-rw-r--r--Http/RememberMe/RememberMeServicesInterface.php3
-rw-r--r--Http/RememberMe/TokenBasedRememberMeServices.php2
20 files changed, 48 insertions, 11 deletions
diff --git a/Acl/Dbal/AclProvider.php b/Acl/Dbal/AclProvider.php
index 143dee6..4a8619d 100644
--- a/Acl/Dbal/AclProvider.php
+++ b/Acl/Dbal/AclProvider.php
@@ -375,6 +375,7 @@ QUERY;
* including the ids of parent ACLs.
*
* @param array $batch
+ *
* @return array
*/
private function getAncestorIds(array $batch)
@@ -395,7 +396,8 @@ QUERY;
* Does either overwrite the passed ACE, or saves it in the global identity
* map to ensure every ACE only gets instantiated once.
*
- * @param array $aces
+ * @param array &$aces
+ *
* @return void
*/
private function doUpdateAceIdentityMap(array &$aces)
@@ -447,7 +449,8 @@ QUERY;
* @throws \RuntimeException
* @return \SplObjectStorage
*/
- private function hydrateObjectIdentities(Statement $stmt, array $oidLookup, array $sids) {
+ private function hydrateObjectIdentities(Statement $stmt, array $oidLookup, array $sids)
+ {
$parentIdToFill = new \SplObjectStorage();
$acls = $aces = $emptyArray = array();
$oidCache = $oidLookup;
diff --git a/Acl/Domain/Acl.php b/Acl/Domain/Acl.php
index ff8db9d..bb088f8 100644
--- a/Acl/Domain/Acl.php
+++ b/Acl/Domain/Acl.php
@@ -587,7 +587,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
/**
* Updates auditing for an ACE
*
- * @param array $aces
+ * @param array &$aces
* @param integer $index
* @param Boolean $auditSuccess
* @param Boolean $auditFailure
diff --git a/Core/Authentication/RememberMe/TokenProviderInterface.php b/Core/Authentication/RememberMe/TokenProviderInterface.php
index b48bd4d..7f86e4e 100644
--- a/Core/Authentication/RememberMe/TokenProviderInterface.php
+++ b/Core/Authentication/RememberMe/TokenProviderInterface.php
@@ -19,23 +19,25 @@ namespace Symfony\Component\Security\Core\Authentication\RememberMe;
interface TokenProviderInterface
{
/**
- * Loads the active token for the given series
+ * Loads the active token for the given series.
*
* @throws TokenNotFoundException if the token is not found
*
* @param string $series
+ *
* @return PersistentTokenInterface
*/
function loadTokenBySeries($series);
/**
- * Deletes all tokens belonging to series
+ * Deletes all tokens belonging to series.
+ *
* @param string $series
*/
function deleteTokenBySeries($series);
/**
- * Updates the token according to this data
+ * Updates the token according to this data.
*
* @param string $series
* @param string $tokenValue
@@ -44,7 +46,8 @@ interface TokenProviderInterface
function updateToken($series, $tokenValue, \DateTime $lastUsed);
/**
- * Creates a new token
+ * Creates a new token.
+ *
* @param PersistentTokenInterface $token
*/
function createNewToken(PersistentTokenInterface $token);
diff --git a/Core/Authentication/Token/RememberMeToken.php b/Core/Authentication/Token/RememberMeToken.php
index 81ab1c2..7ac9e1c 100644
--- a/Core/Authentication/Token/RememberMeToken.php
+++ b/Core/Authentication/Token/RememberMeToken.php
@@ -30,7 +30,8 @@ class RememberMeToken extends AbstractToken
* @param string $providerKey
* @param string $key
*/
- public function __construct(UserInterface $user, $providerKey, $key) {
+ public function __construct(UserInterface $user, $providerKey, $key)
+ {
parent::__construct($user->getRoles());
if (empty($key)) {
diff --git a/Core/Encoder/EncoderFactory.php b/Core/Encoder/EncoderFactory.php
index d7ae32d..738706a 100644
--- a/Core/Encoder/EncoderFactory.php
+++ b/Core/Encoder/EncoderFactory.php
@@ -51,6 +51,7 @@ class EncoderFactory implements EncoderFactoryInterface
* Creates the actual encoder instance
*
* @param array $config
+ *
* @return PasswordEncoderInterface
*/
private function createEncoder(array $config)
diff --git a/Core/Encoder/EncoderFactoryInterface.php b/Core/Encoder/EncoderFactoryInterface.php
index 811c262..3ae07e6 100644
--- a/Core/Encoder/EncoderFactoryInterface.php
+++ b/Core/Encoder/EncoderFactoryInterface.php
@@ -21,9 +21,10 @@ use Symfony\Component\Security\Core\User\UserInterface;
interface EncoderFactoryInterface
{
/**
- * Returns the password encoder to use for the given account
+ * Returns the password encoder to use for the given account.
*
* @param UserInterface $user
+ *
* @return PasswordEncoderInterface never null
*/
function getEncoder(UserInterface $user);
diff --git a/Core/SecurityContext.php b/Core/SecurityContext.php
index 6d11850..0623140 100644
--- a/Core/SecurityContext.php
+++ b/Core/SecurityContext.php
@@ -49,8 +49,10 @@ class SecurityContext implements SecurityContextInterface
* Checks if the attributes are granted against the current token.
*
* @throws AuthenticationCredentialsNotFoundException when the security context has no authentication token.
+ *
* @param mixed $attributes
* @param mixed|null $object
+ *
* @return Boolean
*/
public final function isGranted($attributes, $object = null)
diff --git a/Core/SecurityContextInterface.php b/Core/SecurityContextInterface.php
index d57c409..46b2cc4 100644
--- a/Core/SecurityContextInterface.php
+++ b/Core/SecurityContextInterface.php
@@ -35,6 +35,7 @@ interface SecurityContextInterface
* Sets the authentication token.
*
* @param TokenInterface $token
+ *
* @return void
*/
function setToken(TokenInterface $token = null);
@@ -44,6 +45,7 @@ interface SecurityContextInterface
*
* @param array $attributes
* @param mixed $object
+ *
* @return Boolean
*/
function isGranted($attributes, $object = null);
diff --git a/Core/User/UserInterface.php b/Core/User/UserInterface.php
index 9091bfc..3b66956 100644
--- a/Core/User/UserInterface.php
+++ b/Core/User/UserInterface.php
@@ -61,6 +61,7 @@ interface UserInterface
* are relevant for assessing whether re-authentication is required.
*
* @param UserInterface $user
+ *
* @return Boolean
*/
function equals(UserInterface $user);
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php
index e86824d..d282452 100644
--- a/Http/Firewall/ContextListener.php
+++ b/Http/Firewall/ContextListener.php
@@ -91,7 +91,7 @@ class ContextListener implements ListenerInterface
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
return;
}
-
+
if (!$event->getRequest()->hasSession()) {
return;
}
diff --git a/Http/Firewall/LogoutListener.php b/Http/Firewall/LogoutListener.php
index cd8f9f6..4bfa7e1 100644
--- a/Http/Firewall/LogoutListener.php
+++ b/Http/Firewall/LogoutListener.php
@@ -56,6 +56,7 @@ class LogoutListener implements ListenerInterface
* Adds a logout handler
*
* @param LogoutHandlerInterface $handler
+ *
* @return void
*/
public function addHandler(LogoutHandlerInterface $handler)
diff --git a/Http/FirewallMapInterface.php b/Http/FirewallMapInterface.php
index 99bac06..0630a86 100644
--- a/Http/FirewallMapInterface.php
+++ b/Http/FirewallMapInterface.php
@@ -31,6 +31,7 @@ interface FirewallMapInterface
* must be null.
*
* @param Request $request
+ *
* @return array of the format array(array(AuthenticationListener), ExceptionListener)
*/
function getListeners(Request $request);
diff --git a/Http/Logout/CookieClearingLogoutHandler.php b/Http/Logout/CookieClearingLogoutHandler.php
index 65b45f2..ddb24e3 100644
--- a/Http/Logout/CookieClearingLogoutHandler.php
+++ b/Http/Logout/CookieClearingLogoutHandler.php
@@ -25,7 +25,8 @@ class CookieClearingLogoutHandler implements LogoutHandlerInterface
private $cookies;
/**
- * Constructor
+ * Constructor.
+ *
* @param array $cookies An array of cookie names to unset
*/
public function __construct(array $cookies)
@@ -39,6 +40,7 @@ class CookieClearingLogoutHandler implements LogoutHandlerInterface
* @param Request $request
* @param Response $response
* @param TokenInterface $token
+ *
* @return void
*/
public function logout(Request $request, Response $response, TokenInterface $token)
diff --git a/Http/Logout/LogoutHandlerInterface.php b/Http/Logout/LogoutHandlerInterface.php
index 6d5c519..079cc00 100644
--- a/Http/Logout/LogoutHandlerInterface.php
+++ b/Http/Logout/LogoutHandlerInterface.php
@@ -30,6 +30,7 @@ interface LogoutHandlerInterface
* @param Request $request
* @param Response $response
* @param TokenInterface $token
+ *
* @return void
*/
function logout(Request $request, Response $response, TokenInterface $token);
diff --git a/Http/Logout/LogoutSuccessHandlerInterface.php b/Http/Logout/LogoutSuccessHandlerInterface.php
index 8080cf5..5c6c2b6 100644
--- a/Http/Logout/LogoutSuccessHandlerInterface.php
+++ b/Http/Logout/LogoutSuccessHandlerInterface.php
@@ -30,6 +30,7 @@ interface LogoutSuccessHandlerInterface
* Creates a Response object to send upon a successful logout.
*
* @param Request $request
+ *
* @return Response never null
*/
function onLogoutSuccess(Request $request);
diff --git a/Http/Logout/SessionLogoutHandler.php b/Http/Logout/SessionLogoutHandler.php
index 9fd49d1..0a7e5cd 100644
--- a/Http/Logout/SessionLogoutHandler.php
+++ b/Http/Logout/SessionLogoutHandler.php
@@ -28,6 +28,7 @@ class SessionLogoutHandler implements LogoutHandlerInterface
* @param Request $request
* @param Response $response
* @param TokenInterface $token
+ *
* @return void
*/
public function logout(Request $request, Response $response, TokenInterface $token)
diff --git a/Http/RememberMe/AbstractRememberMeServices.php b/Http/RememberMe/AbstractRememberMeServices.php
index 22e9cd5..94f8830 100644
--- a/Http/RememberMe/AbstractRememberMeServices.php
+++ b/Http/RememberMe/AbstractRememberMeServices.php
@@ -88,6 +88,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* cookie was set, decodes it, and hands it to subclasses for further processing.
*
* @param Request $request
+ *
* @return TokenInterface
*/
public final function autoLogin(Request $request)
@@ -143,6 +144,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* @param Request $request
* @param Response $response
* @param TokenInterface $token
+ *
* @return void
*/
public function logout(Request $request, Response $response, TokenInterface $token)
@@ -155,6 +157,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* an attempted authentication fails.
*
* @param Request $request
+ *
* @return void
*/
public final function loginFail(Request $request)
@@ -170,6 +173,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* @param Request $request
* @param Response $response
* @param TokenInterface $token The token that resulted in a successful authentication
+ *
* @return void
*/
public final function loginSuccess(Request $request, Response $response, TokenInterface $token)
@@ -203,6 +207,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
*
* @param array $cookieParts
* @param Request $request
+ *
* @return TokenInterface
*/
abstract protected function processAutoLoginCookie(array $cookieParts, Request $request);
@@ -219,6 +224,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* @param Request $request
* @param Response $response
* @param TokenInterface $token
+ *
* @return void
*/
abstract protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token);
@@ -238,6 +244,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* Decodes the raw cookie value
*
* @param string $rawCookie
+ *
* @return array
*/
protected function decodeCookie($rawCookie)
@@ -249,6 +256,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* Encodes the cookie parts
*
* @param array $cookieParts
+ *
* @return string
*/
protected function encodeCookie(array $cookieParts)
@@ -260,6 +268,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* Deletes the remember-me cookie
*
* @param Request $request
+ *
* @return void
*/
protected function cancelCookie(Request $request)
@@ -275,6 +284,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* Checks whether remember-me capabilities where requested
*
* @param Request $request
+ *
* @return Boolean
*/
protected function isRememberMeRequested(Request $request)
diff --git a/Http/RememberMe/PersistentTokenBasedRememberMeServices.php b/Http/RememberMe/PersistentTokenBasedRememberMeServices.php
index 91105db..e9d22ba 100644
--- a/Http/RememberMe/PersistentTokenBasedRememberMeServices.php
+++ b/Http/RememberMe/PersistentTokenBasedRememberMeServices.php
@@ -35,6 +35,7 @@ class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices
* Sets the token provider
*
* @param TokenProviderInterface $tokenProvider
+ *
* @return void
*/
public function setTokenProvider(TokenProviderInterface $tokenProvider)
diff --git a/Http/RememberMe/RememberMeServicesInterface.php b/Http/RememberMe/RememberMeServicesInterface.php
index c6b0ada..b824538 100644
--- a/Http/RememberMe/RememberMeServicesInterface.php
+++ b/Http/RememberMe/RememberMeServicesInterface.php
@@ -48,6 +48,7 @@ interface RememberMeServicesInterface
* result in a call to loginFail() and therefore an invalidation of the cookie.
*
* @param Request $request
+ *
* @return TokenInterface
*/
function autoLogin(Request $request);
@@ -59,6 +60,7 @@ interface RememberMeServicesInterface
* This method needs to take care of invalidating the cookie.
*
* @param Request $request
+ *
* @return void
*/
function loginFail(Request $request);
@@ -77,6 +79,7 @@ interface RememberMeServicesInterface
* @param Request $request
* @param Response $response
* @param TokenInterface $token
+ *
* @return void
*/
function loginSuccess(Request $request, Response $response, TokenInterface $token);
diff --git a/Http/RememberMe/TokenBasedRememberMeServices.php b/Http/RememberMe/TokenBasedRememberMeServices.php
index bc23d31..44140f7 100644
--- a/Http/RememberMe/TokenBasedRememberMeServices.php
+++ b/Http/RememberMe/TokenBasedRememberMeServices.php
@@ -140,7 +140,9 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices
* @param string $username The username
* @param integer $expires The unixtime when the cookie expires
* @param string $password The encoded password
+ *
* @throws \RuntimeException when the private key is empty
+ *
* @return string
*/
protected function generateCookieHash($class, $username, $expires, $password)