Skip to content

Commit

Permalink
[All] convert annotation to attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoiriert committed Dec 20, 2023
1 parent 4156c6f commit 9dd33a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 4 additions & 4 deletions packages/sonata-integration-bundle/User/Form/Enable2fa.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

class Enable2fa
{
/**
* @Assert\NotBlank
* @Assert\Length(6)
*/
#[
Assert\NotBlank,
Assert\Length(6)
]
public ?string $code = null;

public ?string $totpSecret = null;
Expand Down
8 changes: 2 additions & 6 deletions packages/user-bundle/DTO/Credential.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@

class Credential
{
/**
* @Assert\NotBlank
*/
#[Assert\NotBlank]
private ?string $username = null;

/**
* @Assert\NotBlank
*/
#[Assert\NotBlank]
private ?string $password = null;

public function getUsername(): ?string
Expand Down

0 comments on commit 9dd33a1

Please sign in to comment.