EnableTwoFactorRequest.php 747 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Packagist\WebBundle\Form\Model;
  3. use Symfony\Component\Validator\Constraints as Assert;
  4. class EnableTwoFactorRequest
  5. {
  6. /**
  7. * @var string
  8. * @Assert\NotBlank
  9. */
  10. protected $secret;
  11. /**
  12. * @var ?string
  13. * @Assert\NotBlank
  14. */
  15. protected $code;
  16. public function __construct(string $secret)
  17. {
  18. $this->secret = $secret;
  19. }
  20. public function getSecret(): string
  21. {
  22. return $this->secret;
  23. }
  24. public function setSecret(string $secret): void
  25. {
  26. $this->secret = $secret;
  27. }
  28. public function getCode(): ?string
  29. {
  30. return $this->code;
  31. }
  32. public function setCode(string $code): void
  33. {
  34. $this->code = $code;
  35. }
  36. }