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}