Skip to content

Commit 383217f

Browse files
Add missing return types to tests/internal/final methods
1 parent dba188c commit 383217f

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Tests/Authentication/AuthenticationTrustResolverTest.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\Core\Tests\Authentication;
1313

14+
use Symfony\Component\Security\Core\User\UserInterface;
1415
use PHPUnit\Framework\TestCase;
1516
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver;
1617
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
@@ -176,7 +177,7 @@ public function getCredentials()
176177
{
177178
}
178179

179-
public function getUser()
180+
public function getUser(): UserInterface
180181
{
181182
}
182183

Tests/Authentication/Provider/DaoAuthenticationProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,5 @@ public function loadUserByIdentifier(string $identifier): UserInterface;
391391

392392
interface DaoAuthenticationProviderTest_UserProvider extends UserProviderInterface
393393
{
394-
public function loadUserByUsername($username);
394+
public function loadUserByUsername($username): string;
395395
}

Tests/Authentication/Token/AbstractTokenTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,22 +268,22 @@ public function __construct($name, array $roles = [])
268268
$this->roles = $roles;
269269
}
270270

271-
public function getUsername()
271+
public function getUsername(): string
272272
{
273273
return $this->name;
274274
}
275275

276-
public function getUserIdentifier()
276+
public function getUserIdentifier(): string
277277
{
278278
return $this->name;
279279
}
280280

281-
public function getPassword()
281+
public function getPassword(): ?string
282282
{
283283
return '***';
284284
}
285285

286-
public function getRoles()
286+
public function getRoles(): array
287287
{
288288
if (empty($this->roles)) {
289289
return ['ROLE_USER'];
@@ -296,7 +296,7 @@ public function eraseCredentials()
296296
{
297297
}
298298

299-
public function getSalt()
299+
public function getSalt(): ?string
300300
{
301301
return null;
302302
}

0 commit comments

Comments
 (0)