Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
27 / 27
100.00% covered (success)
100.00%
18 / 18
CRAP
100.00% covered (success)
100.00%
1 / 1
QuestionEntity
100.00% covered (success)
100.00%
27 / 27
100.00% covered (success)
100.00%
18 / 18
18
100.00% covered (success)
100.00%
1 / 1
 getId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getLanguage
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setLanguage
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getUsername
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setUsername
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getEmail
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setEmail
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCategoryId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCategoryId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getQuestion
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setQuestion
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCreated
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCreated
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getAnswerId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setAnswerId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 isVisible
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setIsVisible
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * The QuestionEntity class
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public License,
7 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
8 * obtain one at https://mozilla.org/MPL/2.0/.
9 *
10 * @package   phpMyFAQ\Entity
11 * @author    Thorsten Rinne <thorsten@phpmyfaq.de>
12 * @copyright 2019-2026 phpMyFAQ Team
13 * @license   https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
14 * @link      https://www.phpmyfaq.de
15 * @since     2019-11-22
16 */
17
18declare(strict_types=1);
19
20namespace phpMyFAQ\Entity;
21
22/**
23 * Class QuestionEntity
24 *
25 * @package phpMyFAQ\Entity
26 */
27class QuestionEntity
28{
29    public int $id;
30
31    public string $language;
32
33    public string $username;
34
35    public string $email;
36
37    public int $categoryId;
38
39    public string $question;
40
41    public string $created;
42
43    public int $answerId;
44
45    public bool $isVisible;
46
47    public function getId(): int
48    {
49        return $this->id;
50    }
51
52    public function setId(int $id): QuestionEntity
53    {
54        $this->id = $id;
55        return $this;
56    }
57
58    public function getLanguage(): string
59    {
60        return $this->language;
61    }
62
63    public function setLanguage(string $language): QuestionEntity
64    {
65        $this->language = $language;
66        return $this;
67    }
68
69    public function getUsername(): string
70    {
71        return $this->username;
72    }
73
74    public function setUsername(string $username): QuestionEntity
75    {
76        $this->username = $username;
77        return $this;
78    }
79
80    public function getEmail(): string
81    {
82        return $this->email;
83    }
84
85    public function setEmail(string $email): QuestionEntity
86    {
87        $this->email = $email;
88        return $this;
89    }
90
91    public function getCategoryId(): int
92    {
93        return $this->categoryId;
94    }
95
96    public function setCategoryId(int $categoryId): QuestionEntity
97    {
98        $this->categoryId = $categoryId;
99        return $this;
100    }
101
102    public function getQuestion(): string
103    {
104        return $this->question;
105    }
106
107    public function setQuestion(string $question): QuestionEntity
108    {
109        $this->question = $question;
110        return $this;
111    }
112
113    public function getCreated(): string
114    {
115        return $this->created;
116    }
117
118    public function setCreated(string $created): QuestionEntity
119    {
120        $this->created = $created;
121        return $this;
122    }
123
124    public function getAnswerId(): int
125    {
126        return $this->answerId;
127    }
128
129    public function setAnswerId(int $answerId): QuestionEntity
130    {
131        $this->answerId = $answerId;
132        return $this;
133    }
134
135    public function isVisible(): bool
136    {
137        return $this->isVisible;
138    }
139
140    public function setIsVisible(bool $isVisible): QuestionEntity
141    {
142        $this->isVisible = $isVisible;
143        return $this;
144    }
145}