Skip to content

Commit fd3ae6d

Browse files
committed
Remove unnecessary empty usages
1 parent 19e26b7 commit fd3ae6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

AccessToken/Cas/Cas2Handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private function getValidationUrl(string $accessToken): string
7474
throw new AuthenticationException('No ticket found in request.');
7575
}
7676
unset($query['ticket']);
77-
$queryString = empty($query) ? '' : '?'.http_build_query($query);
77+
$queryString = $query ? '?'.http_build_query($query) : '';
7878

7979
return sprintf('%s?ticket=%s&service=%s',
8080
$this->validationUrl,

Firewall/ContextListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ContextListener extends AbstractListener
5757
*/
5858
public function __construct(TokenStorageInterface $tokenStorage, iterable $userProviders, string $contextKey, ?LoggerInterface $logger = null, ?EventDispatcherInterface $dispatcher = null, ?AuthenticationTrustResolverInterface $trustResolver = null, ?callable $sessionTrackerEnabler = null)
5959
{
60-
if (empty($contextKey)) {
60+
if (!$contextKey) {
6161
throw new \InvalidArgumentException('$contextKey must not be empty.');
6262
}
6363

0 commit comments

Comments
 (0)