Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
| IdentityDto | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
| getEmail | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getUsername | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getRoles | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Auth\Infrastructure\Dto; |
| 4 | |
| 5 | use App\Auth\Domain\Model\Identity; |
| 6 | use Symfony\Component\ObjectMapper\Attribute\Map; |
| 7 | |
| 8 | #[Map(source: Identity::class)] |
| 9 | final class IdentityDto |
| 10 | { |
| 11 | public string $email; |
| 12 | |
| 13 | public string $username; |
| 14 | |
| 15 | /** |
| 16 | * @var list<string> |
| 17 | */ |
| 18 | public array $roles; |
| 19 | |
| 20 | public function getEmail(): string |
| 21 | { |
| 22 | return $this->email; |
| 23 | } |
| 24 | |
| 25 | public function getUsername(): string |
| 26 | { |
| 27 | return $this->username; |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * @return list<string> |
| 32 | */ |
| 33 | public function getRoles(): array |
| 34 | { |
| 35 | return $this->roles; |
| 36 | } |
| 37 | } |