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 |
| Notification | |
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 | |||
| getMessageId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getIdentityInfo | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPayload | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Notification\Domain\Model; |
| 4 | |
| 5 | /** |
| 6 | * Generic Notification object that will be passed to infrastructure to be sent |
| 7 | * |
| 8 | * @author Wilhelm Zwertvaegher |
| 9 | */ |
| 10 | abstract class Notification |
| 11 | { |
| 12 | |
| 13 | /** |
| 14 | * @param string $messageId |
| 15 | * @param IdentityInfo $identityInfo |
| 16 | * @param NotificationType $type |
| 17 | * @param array<string, string|int> $payload |
| 18 | */ |
| 19 | public function __construct( |
| 20 | private readonly string $messageId, |
| 21 | private readonly IdentityInfo $identityInfo, |
| 22 | private readonly NotificationType $type, |
| 23 | private readonly array $payload |
| 24 | ) { |
| 25 | } |
| 26 | |
| 27 | public function getMessageId(): string |
| 28 | { |
| 29 | return $this->messageId; |
| 30 | } |
| 31 | |
| 32 | public function getIdentityInfo(): IdentityInfo |
| 33 | { |
| 34 | return $this->identityInfo; |
| 35 | } |
| 36 | |
| 37 | public function getType(): NotificationType |
| 38 | { |
| 39 | return $this->type; |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * @return array<string, string|int> |
| 44 | */ |
| 45 | public function getPayload(): array |
| 46 | { |
| 47 | return $this->payload; |
| 48 | } |
| 49 | } |
Below are the source code lines that represent each code path as identified by Xdebug. Please note a path is not
necessarily coterminous with a line, a line may contain multiple paths and therefore show up more than once.
Please also be aware that some paths may include implicit rather than explicit branches, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.
| 19 | public function __construct( |
| 20 | private readonly string $messageId, |
| 21 | private readonly IdentityInfo $identityInfo, |
| 22 | private readonly NotificationType $type, |
| 23 | private readonly array $payload |
| 24 | ) { |
| 25 | } |
| 34 | return $this->identityInfo; |
| 35 | } |
| 29 | return $this->messageId; |
| 30 | } |
| 47 | return $this->payload; |
| 48 | } |
| 39 | return $this->type; |
| 40 | } |