Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
5 / 5
CRAP
100.00% covered (success)
100.00%
1 / 1
Notification
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
5 / 5
5
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getMessageId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getIdentityInfo
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getType
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getPayload
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace 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 */
10abstract 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}

Branches

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.

Notification->__construct
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    }
Notification->getIdentityInfo
34        return $this->identityInfo;
35    }
Notification->getMessageId
29        return $this->messageId;
30    }
Notification->getPayload
47        return $this->payload;
48    }
Notification->getType
39        return $this->type;
40    }