Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
63.64% covered (warning)
63.64%
7 / 11
42.86% covered (danger)
42.86%
3 / 7
42.86% covered (danger)
42.86%
3 / 7
42.86% covered (danger)
42.86%
3 / 7
CRAP
0.00% covered (danger)
0.00%
0 / 1
NotificationLog
63.64% covered (warning)
63.64%
7 / 11
42.86% covered (danger)
42.86%
3 / 7
42.86% covered (danger)
42.86%
3 / 7
42.86% covered (danger)
42.86%
3 / 7
16.14
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
5 / 5
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
 getId
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
 getNotification
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
 getSender
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
 getStatus
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
 getStatusMessage
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
 getCreatedAt
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\Entity;
4
5use App\Enum\NotificationLogStatus;
6use Doctrine\ORM\Mapping as ORM;
7
8/**
9 * @author Wilhelm Zwertvaegher
10 */
11#[ORM\Entity]
12#[ORM\Table(name: 'notification_log')]
13class NotificationLog
14{
15    #[ORM\Id]
16    #[ORM\GeneratedValue]
17    #[ORM\Column(type: 'integer')]
18    private ?int $id = null;
19
20    #[ORM\ManyToOne(targetEntity: Notification::class, cascade: ['persist'], inversedBy: 'notification_logs')]
21    #[ORM\JoinColumn(nullable: false)]
22    private Notification $notification;
23
24    #[ORM\Column(type: 'string')]
25    private string $sender;
26
27    #[ORM\Column(type: 'string', enumType: NotificationLogStatus::class)]
28    private NotificationLogStatus $status;
29
30    #[ORM\Column(type: 'string')]
31    private string $statusMessage;
32
33    #[ORM\Column(type: 'datetime_immutable')]
34    private \DateTimeImmutable $createdAt;
35
36    public function __construct(Notification $notification, string $sender, NotificationLogStatus $status, string $statusMessage, \DateTimeImmutable $createdAt)
37    {
38        $this->notification = $notification;
39        $this->sender = $sender;
40        $this->status = $status;
41        $this->statusMessage = $statusMessage;
42        $this->createdAt = $createdAt;
43    }
44
45    public function getId(): ?int
46    {
47        return $this->id;
48    }
49
50    public function getNotification(): Notification
51    {
52        return $this->notification;
53    }
54
55    public function getSender(): string
56    {
57        return $this->sender;
58    }
59
60    public function getStatus(): NotificationLogStatus
61    {
62        return $this->status;
63    }
64
65    public function getStatusMessage(): string
66    {
67        return $this->statusMessage;
68    }
69
70    public function getCreatedAt(): \DateTimeImmutable
71    {
72        return $this->createdAt;
73    }
74}

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.

NotificationLog->__construct
36    public function __construct(Notification $notification, string $sender, NotificationLogStatus $status, string $statusMessage, \DateTimeImmutable $createdAt)
37    {
38        $this->notification = $notification;
39        $this->sender = $sender;
40        $this->status = $status;
41        $this->statusMessage = $statusMessage;
42        $this->createdAt = $createdAt;
43    }
NotificationLog->getCreatedAt
72        return $this->createdAt;
73    }
NotificationLog->getId
47        return $this->id;
48    }
NotificationLog->getNotification
52        return $this->notification;
53    }
NotificationLog->getSender
57        return $this->sender;
58    }
NotificationLog->getStatus
62        return $this->status;
63    }
NotificationLog->getStatusMessage
67        return $this->statusMessage;
68    }
{main}
3namespace App\Entity;
4
5use App\Enum\NotificationLogStatus;
6use Doctrine\ORM\Mapping as ORM;
7
8/**
9 * @author Wilhelm Zwertvaegher
10 */
11#[ORM\Entity]
12#[ORM\Table(name: 'notification_log')]
13class NotificationLog
14{
15    #[ORM\Id]
16    #[ORM\GeneratedValue]
17    #[ORM\Column(type: 'integer')]
18    private ?int $id = null;
19
20    #[ORM\ManyToOne(targetEntity: Notification::class, cascade: ['persist'], inversedBy: 'notification_logs')]
21    #[ORM\JoinColumn(nullable: false)]
22    private Notification $notification;
23
24    #[ORM\Column(type: 'string')]
25    private string $sender;
26
27    #[ORM\Column(type: 'string', enumType: NotificationLogStatus::class)]
28    private NotificationLogStatus $status;
29
30    #[ORM\Column(type: 'string')]
31    private string $statusMessage;
32
33    #[ORM\Column(type: 'datetime_immutable')]
34    private \DateTimeImmutable $createdAt;
35
36    public function __construct(Notification $notification, string $sender, NotificationLogStatus $status, string $statusMessage, \DateTimeImmutable $createdAt)
37    {
38        $this->notification = $notification;
39        $this->sender = $sender;
40        $this->status = $status;
41        $this->statusMessage = $statusMessage;
42        $this->createdAt = $createdAt;
43    }
44
45    public function getId(): ?int
46    {
47        return $this->id;
48    }
49
50    public function getNotification(): Notification
51    {
52        return $this->notification;
53    }
54
55    public function getSender(): string
56    {
57        return $this->sender;
58    }
59
60    public function getStatus(): NotificationLogStatus
61    {
62        return $this->status;
63    }
64
65    public function getStatusMessage(): string
66    {
67        return $this->statusMessage;
68    }
69
70    public function getCreatedAt(): \DateTimeImmutable
71    {
72        return $this->createdAt;
73    }