summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Patan <florinpatan@gmail.com>2012-12-16 14:02:54 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2012-12-19 08:09:49 +0100
commit1849d1e5d8f925c671ba44ce461859c730298edb (patch)
treea493feeaccda5fc0f8c891b081957676c7a0dbe1
parent2b733ec2d017d7f02f2c034950337e36015acf99 (diff)
downloadsymfony-security-1849d1e5d8f925c671ba44ce461859c730298edb.zip
symfony-security-1849d1e5d8f925c671ba44ce461859c730298edb.tar.gz
symfony-security-1849d1e5d8f925c671ba44ce461859c730298edb.tar.bz2
Fixed most of the docblocks/unused namespaces
-rw-r--r--Acl/Dbal/AclProvider.php2
-rw-r--r--Acl/Dbal/MutableAclProvider.php2
-rw-r--r--Acl/Domain/DoctrineAclCache.php2
-rw-r--r--Acl/Domain/ObjectIdentity.php4
-rw-r--r--Acl/Domain/PermissionGrantingStrategy.php2
-rw-r--r--Acl/Domain/UserSecurityIdentity.php2
-rw-r--r--Acl/Model/MutableAclInterface.php1
-rw-r--r--Acl/Permission/MaskBuilder.php8
-rw-r--r--Core/Authentication/AuthenticationProviderManager.php2
-rw-r--r--Core/Authentication/Provider/UserAuthenticationProvider.php2
-rw-r--r--Core/Authentication/RememberMe/PersistentToken.php2
-rw-r--r--Core/Authentication/Token/AbstractToken.php2
-rw-r--r--Core/Authentication/Token/RememberMeToken.php2
-rw-r--r--Core/Authorization/AccessDecisionManager.php2
-rw-r--r--Core/Encoder/BasePasswordEncoder.php2
-rw-r--r--Core/Encoder/EncoderFactory.php2
-rw-r--r--Core/User/InMemoryUserProvider.php2
-rw-r--r--Http/Firewall/AbstractAuthenticationListener.php5
-rw-r--r--Http/Firewall/AccessListener.php3
-rw-r--r--Http/Firewall/ContextListener.php2
-rw-r--r--Http/Firewall/DigestAuthenticationListener.php2
-rw-r--r--Http/Firewall/LogoutListener.php4
-rw-r--r--Http/Firewall/SwitchUserListener.php7
-rw-r--r--Http/RememberMe/AbstractRememberMeServices.php6
24 files changed, 66 insertions, 4 deletions
diff --git a/Acl/Dbal/AclProvider.php b/Acl/Dbal/AclProvider.php
index ada4f22..1b6eb0a 100644
--- a/Acl/Dbal/AclProvider.php
+++ b/Acl/Dbal/AclProvider.php
@@ -417,6 +417,8 @@ QUERY;
* @param array $oidLookup
*
* @return \SplObjectStorage mapping object identities to ACL instances
+ *
+ * @throws AclNotFoundException
*/
private function lookupObjectIdentities(array $batch, array $sids, array $oidLookup)
{
diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php
index 9a20f61..0ac4fa7 100644
--- a/Acl/Dbal/MutableAclProvider.php
+++ b/Acl/Dbal/MutableAclProvider.php
@@ -147,6 +147,8 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
* @param string $propertyName
* @param mixed $oldValue
* @param mixed $newValue
+ *
+ * @throws \InvalidArgumentException
*/
public function propertyChanged($sender, $propertyName, $oldValue, $newValue)
{
diff --git a/Acl/Domain/DoctrineAclCache.php b/Acl/Domain/DoctrineAclCache.php
index 731f98c..bfc5452 100644
--- a/Acl/Domain/DoctrineAclCache.php
+++ b/Acl/Domain/DoctrineAclCache.php
@@ -36,6 +36,8 @@ class DoctrineAclCache implements AclCacheInterface
* @param Cache $cache
* @param PermissionGrantingStrategyInterface $permissionGrantingStrategy
* @param string $prefix
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(Cache $cache, PermissionGrantingStrategyInterface $permissionGrantingStrategy, $prefix = self::PREFIX)
{
diff --git a/Acl/Domain/ObjectIdentity.php b/Acl/Domain/ObjectIdentity.php
index da98f5e..d7d5f84 100644
--- a/Acl/Domain/ObjectIdentity.php
+++ b/Acl/Domain/ObjectIdentity.php
@@ -31,6 +31,8 @@ final class ObjectIdentity implements ObjectIdentityInterface
*
* @param string $identifier
* @param string $type
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct($identifier, $type)
{
@@ -49,7 +51,7 @@ final class ObjectIdentity implements ObjectIdentityInterface
* Constructs an ObjectIdentity for the given domain object
*
* @param object $domainObject
- * @throws \InvalidArgumentException
+ * @throws InvalidDomainObjectException
* @return ObjectIdentity
*/
public static function fromDomainObject($domainObject)
diff --git a/Acl/Domain/PermissionGrantingStrategy.php b/Acl/Domain/PermissionGrantingStrategy.php
index e075861..d505843 100644
--- a/Acl/Domain/PermissionGrantingStrategy.php
+++ b/Acl/Domain/PermissionGrantingStrategy.php
@@ -131,6 +131,8 @@ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface
* @param Boolean $administrativeMode True turns off audit logging
*
* @return Boolean true, or false; either granting, or denying access respectively.
+ *
+ * @throws NoAceFoundException
*/
private function hasSufficientPermissions(AclInterface $acl, array $aces, array $masks, array $sids, $administrativeMode)
{
diff --git a/Acl/Domain/UserSecurityIdentity.php b/Acl/Domain/UserSecurityIdentity.php
index ebb0056..3166a1a 100644
--- a/Acl/Domain/UserSecurityIdentity.php
+++ b/Acl/Domain/UserSecurityIdentity.php
@@ -31,6 +31,8 @@ final class UserSecurityIdentity implements SecurityIdentityInterface
*
* @param string $username the username representation
* @param string $class the user's fully qualified class name
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct($username, $class)
{
diff --git a/Acl/Model/MutableAclInterface.php b/Acl/Model/MutableAclInterface.php
index 9028aa9..365a779 100644
--- a/Acl/Model/MutableAclInterface.php
+++ b/Acl/Model/MutableAclInterface.php
@@ -115,7 +115,6 @@ interface MutableAclInterface extends AclInterface
* Sets the parent ACL
*
* @param AclInterface|null $acl
- * @return void
*/
public function setParentAcl(AclInterface $acl = null);
diff --git a/Acl/Permission/MaskBuilder.php b/Acl/Permission/MaskBuilder.php
index df1fa7c..017e7c0 100644
--- a/Acl/Permission/MaskBuilder.php
+++ b/Acl/Permission/MaskBuilder.php
@@ -73,6 +73,8 @@ class MaskBuilder
* Constructor
*
* @param integer $mask optional; defaults to 0
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct($mask = 0)
{
@@ -87,7 +89,10 @@ class MaskBuilder
* Adds a mask to the permission
*
* @param mixed $mask
+ *
* @return MaskBuilder
+ *
+ * @throws \InvalidArgumentException
*/
public function add($mask)
{
@@ -140,7 +145,10 @@ class MaskBuilder
* Removes a mask from the permission
*
* @param mixed $mask
+ *
* @return MaskBuilder
+ *
+ * @throws \InvalidArgumentException
*/
public function remove($mask)
{
diff --git a/Core/Authentication/AuthenticationProviderManager.php b/Core/Authentication/AuthenticationProviderManager.php
index 7ca46c0..b0414f0 100644
--- a/Core/Authentication/AuthenticationProviderManager.php
+++ b/Core/Authentication/AuthenticationProviderManager.php
@@ -39,6 +39,8 @@ class AuthenticationProviderManager implements AuthenticationManagerInterface
*
* @param AuthenticationProviderInterface[] $providers An array of AuthenticationProviderInterface instances
* @param Boolean $eraseCredentials Whether to erase credentials after authentication or not
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(array $providers, $eraseCredentials = true)
{
diff --git a/Core/Authentication/Provider/UserAuthenticationProvider.php b/Core/Authentication/Provider/UserAuthenticationProvider.php
index 32d7971..ed8f499 100644
--- a/Core/Authentication/Provider/UserAuthenticationProvider.php
+++ b/Core/Authentication/Provider/UserAuthenticationProvider.php
@@ -37,6 +37,8 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
* @param UserCheckerInterface $userChecker An UserCheckerInterface interface
* @param string $providerKey A provider key
* @param Boolean $hideUserNotFoundExceptions Whether to hide user not found exception or not
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(UserCheckerInterface $userChecker, $providerKey, $hideUserNotFoundExceptions = true)
{
diff --git a/Core/Authentication/RememberMe/PersistentToken.php b/Core/Authentication/RememberMe/PersistentToken.php
index 88b0413..f3f6858 100644
--- a/Core/Authentication/RememberMe/PersistentToken.php
+++ b/Core/Authentication/RememberMe/PersistentToken.php
@@ -32,6 +32,8 @@ final class PersistentToken implements PersistentTokenInterface
* @param string $series
* @param string $tokenValue
* @param \DateTime $lastUsed
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct($class, $username, $series, $tokenValue, \DateTime $lastUsed)
{
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php
index 68cbb79..f21aa76 100644
--- a/Core/Authentication/Token/AbstractToken.php
+++ b/Core/Authentication/Token/AbstractToken.php
@@ -34,6 +34,8 @@ abstract class AbstractToken implements TokenInterface
* Constructor.
*
* @param RoleInterface[] $roles An array of roles
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(array $roles = array())
{
diff --git a/Core/Authentication/Token/RememberMeToken.php b/Core/Authentication/Token/RememberMeToken.php
index de50e5c..6f3d821 100644
--- a/Core/Authentication/Token/RememberMeToken.php
+++ b/Core/Authentication/Token/RememberMeToken.php
@@ -29,6 +29,8 @@ class RememberMeToken extends AbstractToken
* @param UserInterface $user
* @param string $providerKey
* @param string $key
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(UserInterface $user, $providerKey, $key)
{
diff --git a/Core/Authorization/AccessDecisionManager.php b/Core/Authorization/AccessDecisionManager.php
index a8bb5cf..6028c42 100644
--- a/Core/Authorization/AccessDecisionManager.php
+++ b/Core/Authorization/AccessDecisionManager.php
@@ -34,6 +34,8 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
* @param string $strategy The vote strategy
* @param Boolean $allowIfAllAbstainDecisions Whether to grant access if all voters abstained or not
* @param Boolean $allowIfEqualGrantedDeniedDecisions Whether to grant access if result are equals
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(array $voters, $strategy = 'affirmative', $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true)
{
diff --git a/Core/Encoder/BasePasswordEncoder.php b/Core/Encoder/BasePasswordEncoder.php
index 1ef134b..c26c9ce 100644
--- a/Core/Encoder/BasePasswordEncoder.php
+++ b/Core/Encoder/BasePasswordEncoder.php
@@ -52,6 +52,8 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface
* @param string $salt the salt to be used
*
* @return string a merged password and salt
+ *
+ * @throws \InvalidArgumentException
*/
protected function mergePasswordAndSalt($password, $salt)
{
diff --git a/Core/Encoder/EncoderFactory.php b/Core/Encoder/EncoderFactory.php
index 9429441..8bad61f 100644
--- a/Core/Encoder/EncoderFactory.php
+++ b/Core/Encoder/EncoderFactory.php
@@ -51,6 +51,8 @@ class EncoderFactory implements EncoderFactoryInterface
* @param array $config
*
* @return PasswordEncoderInterface
+ *
+ * @throws \InvalidArgumentException
*/
private function createEncoder(array $config)
{
diff --git a/Core/User/InMemoryUserProvider.php b/Core/User/InMemoryUserProvider.php
index eae2083..bd74804 100644
--- a/Core/User/InMemoryUserProvider.php
+++ b/Core/User/InMemoryUserProvider.php
@@ -50,6 +50,8 @@ class InMemoryUserProvider implements UserProviderInterface
* Adds a new User to the provider.
*
* @param UserInterface $user A UserInterface instance
+ *
+ * @throws \LogicException
*/
public function createUser(UserInterface $user)
{
diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php
index 410fb73..087aa08 100644
--- a/Http/Firewall/AbstractAuthenticationListener.php
+++ b/Http/Firewall/AbstractAuthenticationListener.php
@@ -75,6 +75,8 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
* successful, or failed authentication attempt
* @param LoggerInterface $logger A LoggerInterface instance
* @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
{
@@ -110,6 +112,9 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
* Handles form based authentication.
*
* @param GetResponseEvent $event A GetResponseEvent instance
+ *
+ * @throws \RuntimeException
+ * @throws SessionUnavailableException
*/
final public function handle(GetResponseEvent $event)
{
diff --git a/Http/Firewall/AccessListener.php b/Http/Firewall/AccessListener.php
index 3e2d3a5..67766ef 100644
--- a/Http/Firewall/AccessListener.php
+++ b/Http/Firewall/AccessListener.php
@@ -46,6 +46,9 @@ class AccessListener implements ListenerInterface
* Handles access authorization.
*
* @param GetResponseEvent $event A GetResponseEvent instance
+ *
+ * @throws AccessDeniedException
+ * @throws AuthenticationCredentialsNotFoundException
*/
public function handle(GetResponseEvent $event)
{
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php
index fddd3c7..0b5c955 100644
--- a/Http/Firewall/ContextListener.php
+++ b/Http/Firewall/ContextListener.php
@@ -134,6 +134,8 @@ class ContextListener implements ListenerInterface
* @param TokenInterface $token
*
* @return TokenInterface|null
+ *
+ * @throws \RuntimeException
*/
private function refreshUser(TokenInterface $token)
{
diff --git a/Http/Firewall/DigestAuthenticationListener.php b/Http/Firewall/DigestAuthenticationListener.php
index 2bc4aa5..3c83c87 100644
--- a/Http/Firewall/DigestAuthenticationListener.php
+++ b/Http/Firewall/DigestAuthenticationListener.php
@@ -54,6 +54,8 @@ class DigestAuthenticationListener implements ListenerInterface
* Handles digest authentication.
*
* @param GetResponseEvent $event A GetResponseEvent instance
+ *
+ * @throws AuthenticationServiceException
*/
public function handle(GetResponseEvent $event)
{
diff --git a/Http/Firewall/LogoutListener.php b/Http/Firewall/LogoutListener.php
index 32a0511..ca2f439 100644
--- a/Http/Firewall/LogoutListener.php
+++ b/Http/Firewall/LogoutListener.php
@@ -75,8 +75,10 @@ class LogoutListener implements ListenerInterface
* validate the request.
*
* @param GetResponseEvent $event A GetResponseEvent instance
+ *
* @throws InvalidCsrfTokenException if the CSRF token is invalid
- * @throws RuntimeException if the LogoutSuccessHandlerInterface instance does not return a response
+ * @throws \RuntimeException if the LogoutSuccessHandlerInterface instance does not return a response
+ * @throws LogoutException
*/
public function handle(GetResponseEvent $event)
{
diff --git a/Http/Firewall/SwitchUserListener.php b/Http/Firewall/SwitchUserListener.php
index 7f0aa78..8e4f4e5 100644
--- a/Http/Firewall/SwitchUserListener.php
+++ b/Http/Firewall/SwitchUserListener.php
@@ -71,6 +71,8 @@ class SwitchUserListener implements ListenerInterface
* Handles digest authentication.
*
* @param GetResponseEvent $event A GetResponseEvent instance
+ *
+ * @throws \LogicException
*/
public function handle(GetResponseEvent $event)
{
@@ -102,6 +104,9 @@ class SwitchUserListener implements ListenerInterface
* @param Request $request A Request instance
*
* @return TokenInterface|null The new TokenInterface if successfully switched, null otherwise
+ *
+ * @throws \LogicException
+ * @throws AccessDeniedException
*/
private function attemptSwitchUser(Request $request)
{
@@ -148,6 +153,8 @@ class SwitchUserListener implements ListenerInterface
* @param Request $request A Request instance
*
* @return TokenInterface The original TokenInterface instance
+ *
+ * @throws AuthenticationCredentialsNotFoundException
*/
private function attemptExitUser(Request $request)
{
diff --git a/Http/RememberMe/AbstractRememberMeServices.php b/Http/RememberMe/AbstractRememberMeServices.php
index 1d6a109..e49ce14 100644
--- a/Http/RememberMe/AbstractRememberMeServices.php
+++ b/Http/RememberMe/AbstractRememberMeServices.php
@@ -47,6 +47,8 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
* @param string $providerKey
* @param array $options
* @param LoggerInterface $logger
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(array $userProviders, $key, $providerKey, array $options = array(), LoggerInterface $logger = null)
{
@@ -89,7 +91,9 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
*
* @param Request $request
*
- * @return TokenInterface
+ * @return TokenInterface|null
+ *
+ * @throws CookieTheftException
*/
final public function autoLogin(Request $request)
{