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 |
| CreateUserCommandHandler | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMessageHandled | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| __invoke | |
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\EventHandler; |
| 4 | |
| 5 | use App\Shared\Infrastructure\EventHandler\CommandHandler; |
| 6 | use App\Shared\Infrastructure\EventHandler\MessageHandler; |
| 7 | use App\User\Application\Handler\CreateUserHandler; |
| 8 | use MyLegoCollection\SharedContracts\Command\CreateUserCommand; |
| 9 | use Symfony\Component\Messenger\Attribute\AsMessageHandler; |
| 10 | |
| 11 | /** |
| 12 | * @implements CommandHandler<CreateUserCommand> |
| 13 | * @author Wilhelm Zwertvaegher |
| 14 | */ |
| 15 | #[AsMessageHandler] |
| 16 | readonly class CreateUserCommandHandler implements CommandHandler |
| 17 | { |
| 18 | public function __construct(private CreateUserHandler $createUserHandler) |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | public static function getMessageHandled(): string |
| 23 | { |
| 24 | return CreateUserCommand::class; |
| 25 | } |
| 26 | |
| 27 | public function __invoke(CreateUserCommand $command): void |
| 28 | { |
| 29 | ($this->createUserHandler)($command); |
| 30 | } |
| 31 | } |
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.
| 18 | public function __construct(private CreateUserHandler $createUserHandler) |
| 19 | { |
| 20 | } |
| 27 | public function __invoke(CreateUserCommand $command): void |
| 28 | { |
| 29 | ($this->createUserHandler)($command); |
| 30 | } |
| 24 | return CreateUserCommand::class; |
| 25 | } |
| 3 | namespace App\User\Infrastructure\EventHandler; |
| 4 | |
| 5 | use App\Shared\Infrastructure\EventHandler\CommandHandler; |
| 6 | use App\Shared\Infrastructure\EventHandler\MessageHandler; |
| 7 | use App\User\Application\Handler\CreateUserHandler; |
| 8 | use MyLegoCollection\SharedContracts\Command\CreateUserCommand; |
| 9 | use Symfony\Component\Messenger\Attribute\AsMessageHandler; |
| 10 | |
| 11 | /** |
| 12 | * @implements CommandHandler<CreateUserCommand> |
| 13 | * @author Wilhelm Zwertvaegher |
| 14 | */ |
| 15 | #[AsMessageHandler] |
| 16 | readonly class CreateUserCommandHandler implements CommandHandler |
| 17 | { |
| 18 | public function __construct(private CreateUserHandler $createUserHandler) |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | public static function getMessageHandled(): string |
| 23 | { |
| 24 | return CreateUserCommand::class; |
| 25 | } |
| 26 | |
| 27 | public function __invoke(CreateUserCommand $command): void |
| 28 | { |
| 29 | ($this->createUserHandler)($command); |
| 30 | } |