Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| DoctrineRetrieveUserForIdentityAdapter | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| retrieveUser | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\User\Infrastructure\Persistence\Doctrine\Adapter; |
| 4 | |
| 5 | use App\Shared\Domain\Model\EntityId; |
| 6 | use App\User\Domain\Model\User; |
| 7 | use App\User\Domain\Port\Driven\RetrieveUserForIdentity; |
| 8 | use App\User\Domain\Port\Driven\UserRepository; |
| 9 | |
| 10 | /** |
| 11 | * @author Wilhelm Zwertvaegher |
| 12 | */ |
| 13 | readonly class DoctrineRetrieveUserForIdentityAdapter implements RetrieveUserForIdentity |
| 14 | { |
| 15 | |
| 16 | public function __construct(private UserRepository $userRepository) |
| 17 | { |
| 18 | } |
| 19 | |
| 20 | public function retrieveUser(EntityId $identityId): ?User |
| 21 | { |
| 22 | return $this->userRepository->findByIdentityId($identityId); |
| 23 | } |
| 24 | } |