Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit ad78f5a

Browse files
committed
Removed dead code and various cleaning
1 parent 21689b9 commit ad78f5a

File tree

5 files changed

+5
-12
lines changed

5 files changed

+5
-12
lines changed

Acl/Dbal/MutableAclProvider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,6 @@ private function updateNewAceProperty($name, array $changes)
863863

864864
$sids = new \SplObjectStorage();
865865
$classIds = new \SplObjectStorage();
866-
$currentIds = array();
867866
for ($i = 0, $c = count($new); $i<$c; $i++) {
868867
$ace = $new[$i];
869868

@@ -890,8 +889,6 @@ private function updateNewAceProperty($name, array $changes)
890889
$aceIdProperty = new \ReflectionProperty($ace, 'id');
891890
$aceIdProperty->setAccessible(true);
892891
$aceIdProperty->setValue($ace, intval($aceId));
893-
} else {
894-
$currentIds[$ace->getId()] = true;
895892
}
896893
}
897894
}

Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ public function authenticate(TokenInterface $token)
5959
if (!$user = $token->getUser()) {
6060
throw new BadCredentialsException('No pre-authenticated principal found in request.');
6161
}
62-
/*
63-
if (null === $token->getCredentials()) {
64-
throw new BadCredentialsException('No pre-authenticated credentials found in request.');
65-
}
66-
*/
62+
6763
$user = $this->userProvider->loadUserByUsername($user);
6864

6965
$this->userChecker->checkPostAuth($user);

Http/Firewall/AccessListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function handle(GetResponseEvent $event)
5555

5656
$request = $event->getRequest();
5757

58-
list($attributes, $channel) = $this->map->getPatterns($request);
58+
list($attributes) = $this->map->getPatterns($request);
5959

6060
if (null === $attributes) {
6161
return;

Http/Firewall/ExceptionListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function onKernelException(GetResponseForExceptionEvent $event)
8787
} elseif ($exception instanceof AccessDeniedException) {
8888
return $this->handleAccessDeniedException($event, $exception);
8989
} elseif ($exception instanceof LogoutException) {
90-
return $this->handleLogoutException($event, $exception);
90+
return $this->handleLogoutException($exception);
9191
}
9292
} while (null !== $exception = $exception->getPrevious());
9393
}
@@ -153,7 +153,7 @@ private function handleAccessDeniedException(GetResponseForExceptionEvent $event
153153
}
154154
}
155155

156-
private function handleLogoutException(GetResponseForExceptionEvent $event, LogoutException $exception)
156+
private function handleLogoutException(LogoutException $exception)
157157
{
158158
if (null !== $this->logger) {
159159
$this->logger->info(sprintf('Logout exception occurred; wrapping with AccessDeniedHttpException (%s)', $exception->getMessage()));

Http/RememberMe/PersistentTokenBasedRememberMeServices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function cancelCookie(Request $request)
7373
if (null !== ($cookie = $request->cookies->get($this->options['name']))
7474
&& count($parts = $this->decodeCookie($cookie)) === 2
7575
) {
76-
list($series, $tokenValue) = $parts;
76+
list($series) = $parts;
7777
$this->tokenProvider->deleteTokenBySeries($series);
7878
}
7979
}

0 commit comments

Comments
 (0)