Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
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
Contact
100.00% covered (success)
100.00%
7 / 7
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%
3 / 3
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
 getContent
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: 'contact')]
12class Contact
13{
14    #[ORM\Id]
15    #[ORM\GeneratedValue]
16    #[ORM\Column(type: 'integer')]
17    private ?int $id = null;
18
19    #[ORM\Column(type: 'string', length: 100)]
20    private string $senderEmail;
21
22    #[ORM\Column(type: 'text')]
23    private string $content;
24
25    #[ORM\Column(type: 'datetime_immutable')]
26    private \DateTimeImmutable $createdAt;
27
28    public function __construct(
29        string $senderEmail,
30        string $content,
31        \DateTimeImmutable $createdAt,
32    ) {
33        $this->senderEmail = $senderEmail;
34        $this->content = $content;
35        $this->createdAt = $createdAt;
36    }
37
38    public function getId(): ?int
39    {
40        return $this->id;
41    }
42
43    public function getSenderEmail(): string
44    {
45        return $this->senderEmail;
46    }
47
48    public function getContent(): string
49    {
50        return $this->content;
51    }
52
53    public function getCreatedAt(): \DateTimeImmutable
54    {
55        return $this->createdAt;
56    }
57}

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.

Contact->__construct
28    public function __construct(
29        string $senderEmail,
30        string $content,
31        \DateTimeImmutable $createdAt,
32    ) {
33        $this->senderEmail = $senderEmail;
34        $this->content = $content;
35        $this->createdAt = $createdAt;
36    }
Contact->getContent
50        return $this->content;
51    }
Contact->getCreatedAt
55        return $this->createdAt;
56    }
Contact->getId
40        return $this->id;
41    }
Contact->getSenderEmail
45        return $this->senderEmail;
46    }
{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: 'contact')]
12class Contact
13{
14    #[ORM\Id]
15    #[ORM\GeneratedValue]
16    #[ORM\Column(type: 'integer')]
17    private ?int $id = null;
18
19    #[ORM\Column(type: 'string', length: 100)]
20    private string $senderEmail;
21
22    #[ORM\Column(type: 'text')]
23    private string $content;
24
25    #[ORM\Column(type: 'datetime_immutable')]
26    private \DateTimeImmutable $createdAt;
27
28    public function __construct(
29        string $senderEmail,
30        string $content,
31        \DateTimeImmutable $createdAt,
32    ) {
33        $this->senderEmail = $senderEmail;
34        $this->content = $content;
35        $this->createdAt = $createdAt;
36    }
37
38    public function getId(): ?int
39    {
40        return $this->id;
41    }
42
43    public function getSenderEmail(): string
44    {
45        return $this->senderEmail;
46    }
47
48    public function getContent(): string
49    {
50        return $this->content;
51    }
52
53    public function getCreatedAt(): \DateTimeImmutable
54    {
55        return $this->createdAt;
56    }