Fixed some deprecations related to missing return types

This commit is contained in:
Jan Böhmer 2023-10-25 17:27:37 +02:00
parent eb24aa2e68
commit 294f7cf005
11 changed files with 20 additions and 21 deletions

View file

@ -28,22 +28,21 @@ use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface;
use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticatorInterface;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\ConstraintValidatorInterface;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
class ValidGoogleAuthCodeValidatorTest extends ConstraintValidatorTestCase
{
protected function createValidator()
protected function createValidator(): ConstraintValidatorInterface
{
$googleAuth = new class implements GoogleAuthenticatorInterface
{
public function checkCode(TwoFactorInterface $user, string $code): bool
{
if ($code === '123456') {
return true;
}
return false;
return $code === '123456';
}
public function getQRContent(TwoFactorInterface $user): string