diff options
author | Lukas Kahwe Smith <smith@pooteeweet.org> | 2011-02-04 19:10:13 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2011-02-04 19:30:28 +0100 |
commit | 2a76050d8acbf1fbed248a94dce4b2525e9e9635 (patch) | |
tree | 69af4d9fb84f94f2fff0ab04e0e76aa9fcb9eb7b | |
parent | 711ab84f4d4d4d1c313a25898a18c7284f2e33ee (diff) | |
download | symfony-security-2a76050d8acbf1fbed248a94dce4b2525e9e9635.zip symfony-security-2a76050d8acbf1fbed248a94dce4b2525e9e9635.tar.gz symfony-security-2a76050d8acbf1fbed248a94dce4b2525e9e9635.tar.bz2 |
some fixes by just "blindly" trying to make phpStorm code analysis happier
-rw-r--r-- | Acl/Dbal/AclProvider.php | 1 | ||||
-rw-r--r-- | Acl/Dbal/MutableAclProvider.php | 4 | ||||
-rw-r--r-- | Acl/Domain/Acl.php | 3 | ||||
-rw-r--r-- | Acl/Domain/DoctrineAclCache.php | 6 | ||||
-rw-r--r-- | Acl/Domain/Entry.php | 3 | ||||
-rw-r--r-- | Acl/Domain/PermissionGrantingStrategy.php | 3 | ||||
-rw-r--r-- | Acl/Voter/AclVoter.php | 2 | ||||
-rw-r--r-- | Http/EntryPoint/DigestAuthenticationEntryPoint.php | 2 | ||||
-rw-r--r-- | Http/EntryPoint/FormAuthenticationEntryPoint.php | 1 | ||||
-rw-r--r-- | Http/Firewall/AnonymousAuthenticationListener.php | 2 | ||||
-rw-r--r-- | Http/Firewall/DigestAuthenticationListener.php | 3 | ||||
-rw-r--r-- | Http/Firewall/ExceptionListener.php | 1 | ||||
-rw-r--r-- | Http/FirewallMap.php | 2 |
13 files changed, 15 insertions, 18 deletions
diff --git a/Acl/Dbal/AclProvider.php b/Acl/Dbal/AclProvider.php index 4a2870f..40bd067 100644 --- a/Acl/Dbal/AclProvider.php +++ b/Acl/Dbal/AclProvider.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Acl\Dbal; use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\Statement; +use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Domain\Acl; use Symfony\Component\Security\Acl\Domain\Entry; use Symfony\Component\Security\Acl\Domain\FieldEntry; diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php index 8ef08e2..da5ded9 100644 --- a/Acl/Dbal/MutableAclProvider.php +++ b/Acl/Dbal/MutableAclProvider.php @@ -785,7 +785,7 @@ QUERY; } } - foreach ($changes[0] as $field => $old) { + foreach ($changes[0] as $old) { for ($i=0,$c=count($old); $i<$c; $i++) { $ace = $old[$i]; @@ -884,4 +884,4 @@ QUERY; $this->connection->executeQuery($this->getUpdateAccessControlEntrySql($ace->getId(), $sets)); } } -}
\ No newline at end of file +} diff --git a/Acl/Domain/Acl.php b/Acl/Domain/Acl.php index 671b64e..3799452 100644 --- a/Acl/Domain/Acl.php +++ b/Acl/Domain/Acl.php @@ -17,7 +17,6 @@ use Symfony\Component\Security\Acl\Model\EntryInterface; use Symfony\Component\Security\Acl\Model\MutableAclInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface; use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface; -use Symfony\Component\Security\Acl\Model\PermissionInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; @@ -676,4 +675,4 @@ class Acl implements AuditableAclInterface $ace->setStrategy($strategy); } } -}
\ No newline at end of file +} diff --git a/Acl/Domain/DoctrineAclCache.php b/Acl/Domain/DoctrineAclCache.php index f8fa186..b6c3475 100644 --- a/Acl/Domain/DoctrineAclCache.php +++ b/Acl/Domain/DoctrineAclCache.php @@ -176,7 +176,7 @@ class DoctrineAclCache implements AclCacheInterface $aceClassFieldProperty = new \ReflectionProperty($acl, 'classFieldAces'); $aceClassFieldProperty->setAccessible(true); - foreach ($aceClassFieldProperty->getValue($acl) as $field => $aces) { + foreach ($aceClassFieldProperty->getValue($acl) as $aces) { foreach ($aces as $ace) { $aceAclProperty->setValue($ace, $acl); } @@ -185,7 +185,7 @@ class DoctrineAclCache implements AclCacheInterface $aceObjectFieldProperty = new \ReflectionProperty($acl, 'objectFieldAces'); $aceObjectFieldProperty->setAccessible(true); - foreach ($aceObjectFieldProperty->getValue($acl) as $field => $aces) { + foreach ($aceObjectFieldProperty->getValue($acl) as $aces) { foreach ($aces as $ace) { $aceAclProperty->setValue($ace, $acl); } @@ -219,4 +219,4 @@ class DoctrineAclCache implements AclCacheInterface { return $this->prefix.$aclId; } -}
\ No newline at end of file +} diff --git a/Acl/Domain/Entry.php b/Acl/Domain/Entry.php index a3199c9..1d50083 100644 --- a/Acl/Domain/Entry.php +++ b/Acl/Domain/Entry.php @@ -14,7 +14,6 @@ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Model\AuditableEntryInterface; use Symfony\Component\Security\Acl\Model\EntryInterface; -use Symfony\Component\Security\Acl\Model\PermissionInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; /** @@ -212,4 +211,4 @@ class Entry implements AuditableEntryInterface $this->granting ) = unserialize($serialized); } -}
\ No newline at end of file +} diff --git a/Acl/Domain/PermissionGrantingStrategy.php b/Acl/Domain/PermissionGrantingStrategy.php index 84ac135..dc73572 100644 --- a/Acl/Domain/PermissionGrantingStrategy.php +++ b/Acl/Domain/PermissionGrantingStrategy.php @@ -17,7 +17,6 @@ use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Model\AuditLoggerInterface; use Symfony\Component\Security\Acl\Model\EntryInterface; use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface; -use Symfony\Component\Security\Acl\Model\PermissionInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; /** @@ -226,4 +225,4 @@ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface throw new \RuntimeException(sprintf('The strategy "%s" is not supported.', $strategy)); } } -}
\ No newline at end of file +} diff --git a/Acl/Voter/AclVoter.php b/Acl/Voter/AclVoter.php index ee9a758..14acef5 100644 --- a/Acl/Voter/AclVoter.php +++ b/Acl/Voter/AclVoter.php @@ -141,4 +141,4 @@ class AclVoter implements VoterInterface { return true; } -}
\ No newline at end of file +} diff --git a/Http/EntryPoint/DigestAuthenticationEntryPoint.php b/Http/EntryPoint/DigestAuthenticationEntryPoint.php index ecc6178..71866b4 100644 --- a/Http/EntryPoint/DigestAuthenticationEntryPoint.php +++ b/Http/EntryPoint/DigestAuthenticationEntryPoint.php @@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Http\EntryPoint; use Symfony\Component\EventDispatcher\EventInterface; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; -use Symfony\Component\Security\Core\Exception\NonceExpiredException; +use Symfony\Component\HttpKernel\Security\EntryPoint\NonceExpiredException; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Log\LoggerInterface; diff --git a/Http/EntryPoint/FormAuthenticationEntryPoint.php b/Http/EntryPoint/FormAuthenticationEntryPoint.php index 7a18b2f..7bf4881 100644 --- a/Http/EntryPoint/FormAuthenticationEntryPoint.php +++ b/Http/EntryPoint/FormAuthenticationEntryPoint.php @@ -17,6 +17,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; use Symfony\Component\Security\Core\SecurityContext; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * FormAuthenticationEntryPoint starts an authentication via a login form. diff --git a/Http/Firewall/AnonymousAuthenticationListener.php b/Http/Firewall/AnonymousAuthenticationListener.php index 43ef9a9..986cd21 100644 --- a/Http/Firewall/AnonymousAuthenticationListener.php +++ b/Http/Firewall/AnonymousAuthenticationListener.php @@ -62,8 +62,6 @@ class AnonymousAuthenticationListener implements ListenerInterface */ public function handle(EventInterface $event) { - $request = $event->get('request'); - if (null !== $this->context->getToken()) { return; } diff --git a/Http/Firewall/DigestAuthenticationListener.php b/Http/Firewall/DigestAuthenticationListener.php index ec263a4..559f28c 100644 --- a/Http/Firewall/DigestAuthenticationListener.php +++ b/Http/Firewall/DigestAuthenticationListener.php @@ -21,7 +21,7 @@ use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Exception\BadCredentialsException; use Symfony\Component\Security\Core\Exception\AuthenticationServiceException; use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; -use Symfony\Component\Security\Http\EntryPoint\NonceExpiredException; +use Symfony\Component\HttpKernel\Security\EntryPoint\NonceExpiredException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Core\Exception\AuthenticationException; @@ -87,6 +87,7 @@ class DigestAuthenticationListener implements ListenerInterface return; } + // FIXME if ($token instanceof UsernamePasswordToken && $token->isAuthenticated() && (string) $token === $username) { return; } diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php index d40b3b5..79e5313 100644 --- a/Http/Firewall/ExceptionListener.php +++ b/Http/Firewall/ExceptionListener.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Security\Http\Firewall; use Symfony\Component\HttpFoundation\Response; -use Symfony\Bundle\SecurityBundle\Security\AccessDeniedHandler; use Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface; use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; diff --git a/Http/FirewallMap.php b/Http/FirewallMap.php index ac2a9f9..b5d5599 100644 --- a/Http/FirewallMap.php +++ b/Http/FirewallMap.php @@ -4,7 +4,7 @@ namespace Symfony\Component\Security\Http; use Symfony\Component\HttpFoundation\RequestMatcherInterface; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Security\Firewall\ExceptionListener; +use Symfony\Component\Security\Http\Firewall\ExceptionListener; /* * This file is part of the Symfony framework. |