Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
1 / 1 |
| AuthenticatedUser | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getUserIdentifier | |
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 | |||
| getPassword | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| eraseCredentials | |
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\Security\User; |
| 4 | |
| 5 | use App\Auth\Domain\Model\Identity; |
| 6 | use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; |
| 7 | use Symfony\Component\Security\Core\User\UserInterface; |
| 8 | |
| 9 | readonly class AuthenticatedUser implements UserInterface, PasswordAuthenticatedUserInterface |
| 10 | { |
| 11 | public function __construct(private Identity $identity) |
| 12 | { |
| 13 | } |
| 14 | |
| 15 | public function getUserIdentifier(): string |
| 16 | { |
| 17 | return $this->identity->getId()->value(); |
| 18 | } |
| 19 | |
| 20 | public function getRoles(): array |
| 21 | { |
| 22 | return $this->identity->getRoles(); |
| 23 | } |
| 24 | |
| 25 | public function getPassword(): ?string |
| 26 | { |
| 27 | return $this->identity->getPasswordHash(); |
| 28 | } |
| 29 | |
| 30 | #[\Deprecated] |
| 31 | public function eraseCredentials(): void |
| 32 | { |
| 33 | } |
| 34 | } |
Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not
necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once.
Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.
| 11 | public function __construct(private Identity $identity) |
| 12 | { |
| 13 | } |
| 33 | } |
| 27 | return $this->identity->getPasswordHash(); |
| 28 | } |
| 22 | return $this->identity->getRoles(); |
| 23 | } |
| 17 | return $this->identity->getId()->value(); |
| 18 | } |
| 3 | namespace App\Auth\Infrastructure\Security\User; |
| 4 | |
| 5 | use App\Auth\Domain\Model\Identity; |
| 6 | use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; |
| 7 | use Symfony\Component\Security\Core\User\UserInterface; |
| 8 | |
| 9 | readonly class AuthenticatedUser implements UserInterface, PasswordAuthenticatedUserInterface |
| 10 | { |
| 11 | public function __construct(private Identity $identity) |
| 12 | { |
| 13 | } |
| 14 | |
| 15 | public function getUserIdentifier(): string |
| 16 | { |
| 17 | return $this->identity->getId()->value(); |
| 18 | } |
| 19 | |
| 20 | public function getRoles(): array |
| 21 | { |
| 22 | return $this->identity->getRoles(); |
| 23 | } |
| 24 | |
| 25 | public function getPassword(): ?string |
| 26 | { |
| 27 | return $this->identity->getPasswordHash(); |
| 28 | } |
| 29 | |
| 30 | #[\Deprecated] |
| 31 | public function eraseCredentials(): void |
| 32 | { |
| 33 | } |