Skip to content

Commit 4c6e207

Browse files
Fix some return types in tests
1 parent 6791856 commit 4c6e207

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Security\Http\Tests\Authenticator;
1313

14+
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
1415
use PHPUnit\Framework\TestCase;
1516
use Symfony\Component\HttpFoundation\Request;
1617
use Symfony\Component\HttpFoundation\Response;
@@ -109,7 +110,7 @@ protected function getLoginUrl(Request $request): string
109110
return $this->loginUrl;
110111
}
111112

112-
public function authenticate(Request $request)
113+
public function authenticate(Request $request): Passport
113114
{
114115
return new SelfValidatingPassport(new UserBadge('dummy'));
115116
}

Tests/EventListener/PasswordMigratingListenerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ public function loadUserByIdentifier(string $identifier): UserInterface
173173
{
174174
}
175175

176-
public function refreshUser(UserInterface $user)
176+
public function refreshUser(UserInterface $user): UserInterface
177177
{
178178
}
179179

180-
public function supportsClass(string $class)
180+
public function supportsClass(string $class): bool
181181
{
182182
}
183183

184-
public function loadUserByUsername(string $username)
184+
public function loadUserByUsername(string $username): UserInterface
185185
{
186186
}
187187
}
@@ -214,7 +214,7 @@ public function eraseCredentials()
214214
{
215215
}
216216

217-
public function getUsername()
217+
public function getUsername(): string
218218
{
219219
}
220220

0 commit comments

Comments
 (0)