1 | <?php |
||
22 | class Question |
||
23 | { |
||
24 | /** |
||
25 | * @ORM\Id |
||
26 | * @ORM\GeneratedValue |
||
27 | * @ORM\Column(type="integer") |
||
28 | */ |
||
29 | private $id; |
||
30 | |||
31 | /** |
||
32 | * @ORM\Column(name="sort", type="integer") |
||
33 | */ |
||
34 | private $sort; |
||
35 | |||
36 | /** |
||
37 | * @ORM\Column(name="text_question", type="string") |
||
38 | * @Assert\NotBlank() |
||
39 | */ |
||
40 | private $textQuestion; |
||
41 | |||
42 | /** |
||
43 | * @ORM\Column(name="all_incorrect", type="boolean", nullable=true) |
||
44 | */ |
||
45 | private $allIncorrect; |
||
46 | /** |
||
47 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Module", inversedBy="questions") |
||
48 | */ |
||
49 | private $module; |
||
50 | |||
51 | /** |
||
52 | * @ORM\OneToMany(targetEntity="AppBundle\Entity\Answer", mappedBy="question", cascade={"persist", "remove"}) |
||
53 | * @Assert\Count( |
||
54 | * min = "2", |
||
55 | * minMessage = "You must specify at least two answers" |
||
56 | * ) |
||
57 | */ |
||
58 | private $answers; |
||
59 | |||
60 | /** |
||
61 | * @ORM\OneToMany(targetEntity="AppBundle\Entity\PassModule", mappedBy="currentQuestion") |
||
62 | */ |
||
63 | private $passModules; |
||
|
|||
64 | |||
65 | |||
66 | 27 | public function __construct() |
|
70 | |||
71 | /** |
||
72 | * @return mixed |
||
73 | */ |
||
74 | 3 | public function getAnswers() |
|
78 | |||
79 | /** |
||
80 | * @param Answer $answer |
||
81 | * @return $this |
||
82 | */ |
||
83 | public function addAnswer(Answer $answer) |
||
89 | |||
90 | /** |
||
91 | * @param Answer $answer |
||
92 | */ |
||
93 | public function removeAnswer(Answer $answer) |
||
97 | |||
98 | /** |
||
99 | * @return mixed |
||
100 | */ |
||
101 | 2 | public function getId() |
|
105 | |||
106 | /** |
||
107 | * @return mixed |
||
108 | */ |
||
109 | 3 | public function getSort() |
|
113 | |||
114 | /** |
||
115 | * @param mixed $sort |
||
116 | */ |
||
117 | 27 | public function setSort($sort) |
|
121 | |||
122 | /** |
||
123 | * @return mixed |
||
124 | */ |
||
125 | 4 | public function getTextQuestion() |
|
129 | |||
130 | /** |
||
131 | * @param mixed $textQuestion |
||
132 | */ |
||
133 | 27 | public function setTextQuestion($textQuestion) |
|
137 | |||
138 | /** |
||
139 | * @return mixed |
||
140 | */ |
||
141 | 1 | public function getModule() |
|
145 | |||
146 | /** |
||
147 | * @param mixed $module |
||
148 | */ |
||
149 | 27 | public function setModule(Module $module = null) |
|
153 | |||
154 | /** |
||
155 | * @return mixed |
||
156 | */ |
||
157 | 2 | public function getAllIncorrect() |
|
161 | |||
162 | /** |
||
163 | * @param mixed $allIncorrect |
||
164 | */ |
||
165 | 27 | public function setAllIncorrect($allIncorrect) |
|
169 | |||
170 | 1 | public function getCountAnswers() |
|
174 | |||
175 | } |
||
176 |
This check marks private properties in classes that are never used. Those properties can be removed.