Lines 100.00% 18 / 18
Methods 100.00% 12 / 12
Classes 100.00% 1 / 1
Covered by tests of size
Name Lines Methods CRAP
 getId 100.00% 1 / 1 100.00% 1 / 1 1
 setId 100.00% 2 / 2 100.00% 1 / 1 1
 getSenderId 100.00% 1 / 1 100.00% 1 / 1 1
 setSenderId 100.00% 2 / 2 100.00% 1 / 1 1
 getRecipientId 100.00% 1 / 1 100.00% 1 / 1 1
 setRecipientId 100.00% 2 / 2 100.00% 1 / 1 1
 getMessage 100.00% 1 / 1 100.00% 1 / 1 1
 setMessage 100.00% 2 / 2 100.00% 1 / 1 1
 isRead 100.00% 1 / 1 100.00% 1 / 1 1
 setIsRead 100.00% 2 / 2 100.00% 1 / 1 1
 getCreatedAt 100.00% 1 / 1 100.00% 1 / 1 1
 setCreatedAt 100.00% 2 / 2 100.00% 1 / 1 1
24class ChatMessage
25{
26    public int $id;
27
28    public int $senderId;
29
30    public int $recipientId;
31
32    public string $message;
33
34    public bool $isRead;
35
36    public DateTimeImmutable $createdAt;
37
38    public function getId(): int
39    {
40        return $this->id;
41    }
42
43    public function setId(int $id): ChatMessage
44    {
45        $this->id = $id;
46        return $this;
47    }
48
49    public function getSenderId(): int
50    {
51        return $this->senderId;
52    }
53
54    public function setSenderId(int $senderId): ChatMessage
55    {
56        $this->senderId = $senderId;
57        return $this;
58    }
59
60    public function getRecipientId(): int
61    {
62        return $this->recipientId;
63    }
64
65    public function setRecipientId(int $recipientId): ChatMessage
66    {
67        $this->recipientId = $recipientId;
68        return $this;
69    }
70
71    public function getMessage(): string
72    {
73        return $this->message;
74    }
75
76    public function setMessage(string $message): ChatMessage
77    {
78        $this->message = $message;
79        return $this;
80    }
81
82    public function isRead(): bool
83    {
84        return $this->isRead;
85    }
86
87    public function setIsRead(bool $isRead): ChatMessage
88    {
89        $this->isRead = $isRead;
90        return $this;
91    }
92
93    public function getCreatedAt(): DateTimeImmutable
94    {
95        return $this->createdAt;
96    }
97
98    public function setCreatedAt(DateTimeImmutable $createdAt): ChatMessage
99    {
100        $this->createdAt = $createdAt;
101        return $this;
102    }
103}