Skip to content

Commit 222e3af

Browse files
Fix some return types in tests
1 parent f7c4081 commit 222e3af

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ private function getRoleHierarchy()
434434

435435
final class DummyVoter implements VoterInterface
436436
{
437-
public function vote(TokenInterface $token, $subject, array $attributes)
437+
public function vote(TokenInterface $token, $subject, array $attributes): int
438438
{
439439
}
440440
}

src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function cloneVar($var): Data
7474

7575
class MockDumper implements DataDumperInterface
7676
{
77-
public function dump(Data $data)
77+
public function dump(Data $data): ?string
7878
{
7979
echo '+'.$data->getValue();
8080
}

src/Symfony/Component/Security/Http/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
}

src/Symfony/Component/Security/Http/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)