Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
66.67% covered (warning)
66.67%
2 / 3
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
NotificationLogCreatedEvent
66.67% covered (warning)
66.67%
2 / 3
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
2.50
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
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
 getNotificationLog
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Notification\Domain\Event;
4
5use App\Auth\Domain\Model\Identity;
6use App\Notification\Domain\Model\NotificationLog;
7use App\Shared\Domain\Event\DomainEvent;
8
9/**
10 * @author Wilhelm Zwertvaegher
11 */
12class NotificationLogCreatedEvent extends DomainEvent
13{
14    private const string TYPE = 'notification.log.created';
15
16    private readonly NotificationLog $notificationLog;
17
18    /**
19     * @param NotificationLog $notificationLog
20     * @param array<string, string|int>|null $metadata
21     */
22    public function __construct(NotificationLog $notificationLog, ?array $metadata = null)
23    {
24        parent::__construct(self::TYPE, $metadata);
25        $this->notificationLog = $notificationLog;
26    }
27
28    public function getNotificationLog(): NotificationLog
29    {
30        return $this->notificationLog;
31    }
32}

Paths

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.

NotificationLogCreatedEvent->__construct
22    public function __construct(NotificationLog $notificationLog, ?array $metadata = null)
23    {
24        parent::__construct(self::TYPE, $metadata);
25        $this->notificationLog = $notificationLog;
26    }
NotificationLogCreatedEvent->getNotificationLog
30        return $this->notificationLog;
31    }
{main}
3namespace App\Notification\Domain\Event;
4
5use App\Auth\Domain\Model\Identity;
6use App\Notification\Domain\Model\NotificationLog;
7use App\Shared\Domain\Event\DomainEvent;
8
9/**
10 * @author Wilhelm Zwertvaegher
11 */
12class NotificationLogCreatedEvent extends DomainEvent
13{
14    private const string TYPE = 'notification.log.created';
15
16    private readonly NotificationLog $notificationLog;
17
18    /**
19     * @param NotificationLog $notificationLog
20     * @param array<string, string|int>|null $metadata
21     */
22    public function __construct(NotificationLog $notificationLog, ?array $metadata = null)
23    {
24        parent::__construct(self::TYPE, $metadata);
25        $this->notificationLog = $notificationLog;
26    }
27
28    public function getNotificationLog(): NotificationLog
29    {
30        return $this->notificationLog;
31    }