Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
9 / 9
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
6 / 6
CRAP
100.00% covered (success)
100.00%
1 / 1
Report
100.00% covered (success)
100.00%
9 / 9
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
6 / 6
6
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
4 / 4
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
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
 getSenderEmail
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
 getReason
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
 getNick
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
 getCreatedAt
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\Entity;
4
5use Doctrine\ORM\Mapping as ORM;
6
7/**
8 * @author Wilhelm Zwertvaegher
9 */
10#[ORM\Entity]
11#[ORM\Table(name: 'report')]
12#[ORM\UniqueConstraint(name: 'uq_report_properties', columns: ['nick_id', 'sender_email'])]
13class Report
14{
15    #[ORM\Id]
16    #[ORM\GeneratedValue]
17    #[ORM\Column(type: 'integer')]
18    private ?int $id = null;
19
20    #[ORM\Column(type: 'string', length: 100)]
21    private string $senderEmail;
22
23    #[ORM\Column(type: 'text')]
24    private string $reason;
25
26    #[ORM\ManyToOne(targetEntity: Nick::class)]
27    #[ORM\JoinColumn(nullable: false)]
28    private Nick $nick;
29
30    #[ORM\Column(type: 'datetime_immutable')]
31    private \DateTimeImmutable $createdAt;
32
33    public function __construct(string $senderEmail, string $reason, Nick $nick, \DateTimeImmutable $createdAt)
34    {
35        $this->senderEmail = $senderEmail;
36        $this->reason = $reason;
37        $this->nick = $nick;
38        $this->createdAt = $createdAt;
39    }
40
41    public function getId(): ?int
42    {
43        return $this->id;
44    }
45
46    public function getSenderEmail(): string
47    {
48        return $this->senderEmail;
49    }
50
51    public function getReason(): string
52    {
53        return $this->reason;
54    }
55
56    public function getNick(): Nick
57    {
58        return $this->nick;
59    }
60
61    public function getCreatedAt(): \DateTimeImmutable
62    {
63        return $this->createdAt;
64    }
65}

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.

Report->__construct
33    public function __construct(string $senderEmail, string $reason, Nick $nick, \DateTimeImmutable $createdAt)
34    {
35        $this->senderEmail = $senderEmail;
36        $this->reason = $reason;
37        $this->nick = $nick;
38        $this->createdAt = $createdAt;
39    }
Report->getCreatedAt
63        return $this->createdAt;
64    }
Report->getId
43        return $this->id;
44    }
Report->getNick
58        return $this->nick;
59    }
Report->getReason
53        return $this->reason;
54    }
Report->getSenderEmail
48        return $this->senderEmail;
49    }
{main}
3namespace App\Entity;
4
5use Doctrine\ORM\Mapping as ORM;
6
7/**
8 * @author Wilhelm Zwertvaegher
9 */
10#[ORM\Entity]
11#[ORM\Table(name: 'report')]
12#[ORM\UniqueConstraint(name: 'uq_report_properties', columns: ['nick_id', 'sender_email'])]
13class Report
14{
15    #[ORM\Id]
16    #[ORM\GeneratedValue]
17    #[ORM\Column(type: 'integer')]
18    private ?int $id = null;
19
20    #[ORM\Column(type: 'string', length: 100)]
21    private string $senderEmail;
22
23    #[ORM\Column(type: 'text')]
24    private string $reason;
25
26    #[ORM\ManyToOne(targetEntity: Nick::class)]
27    #[ORM\JoinColumn(nullable: false)]
28    private Nick $nick;
29
30    #[ORM\Column(type: 'datetime_immutable')]
31    private \DateTimeImmutable $createdAt;
32
33    public function __construct(string $senderEmail, string $reason, Nick $nick, \DateTimeImmutable $createdAt)
34    {
35        $this->senderEmail = $senderEmail;
36        $this->reason = $reason;
37        $this->nick = $nick;
38        $this->createdAt = $createdAt;
39    }
40
41    public function getId(): ?int
42    {
43        return $this->id;
44    }
45
46    public function getSenderEmail(): string
47    {
48        return $this->senderEmail;
49    }
50
51    public function getReason(): string
52    {
53        return $this->reason;
54    }
55
56    public function getNick(): Nick
57    {
58        return $this->nick;
59    }
60
61    public function getCreatedAt(): \DateTimeImmutable
62    {
63        return $this->createdAt;
64    }