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

Commit 2311192

Browse files
committed
CS: Apply ternary_to_null_coalescing fixer
1 parent f14841e commit 2311192

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Core/User/InMemoryUserProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ class InMemoryUserProvider implements UserProviderInterface
3535
public function __construct(array $users = [])
3636
{
3737
foreach ($users as $username => $attributes) {
38-
$password = isset($attributes['password']) ? $attributes['password'] : null;
39-
$enabled = isset($attributes['enabled']) ? $attributes['enabled'] : true;
40-
$roles = isset($attributes['roles']) ? $attributes['roles'] : [];
38+
$password = $attributes['password'] ?? null;
39+
$enabled = $attributes['enabled'] ?? true;
40+
$roles = $attributes['roles'] ?? [];
4141
$user = new User($username, $password, $roles, $enabled, true, true, true);
4242

4343
$this->createUser($user);

Http/Logout/CookieClearingLogoutHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(array $cookies)
3838
public function logout(Request $request, Response $response, TokenInterface $token)
3939
{
4040
foreach ($this->cookies as $cookieName => $cookieData) {
41-
$response->headers->clearCookie($cookieName, $cookieData['path'], $cookieData['domain'], isset($cookieData['secure']) ? $cookieData['secure'] : false, true, isset($cookieData['samesite']) ? $cookieData['samesite'] : null);
41+
$response->headers->clearCookie($cookieName, $cookieData['path'], $cookieData['domain'], $cookieData['secure'] ?? false, true, $cookieData['samesite'] ?? null);
4242
}
4343
}
4444
}

0 commit comments

Comments
 (0)