1 | <?php |
||
22 | class Translation implements \JsonSerializable |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | * |
||
27 | * @ES\Id() |
||
28 | */ |
||
29 | private $id; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | * |
||
34 | * @ES\Property(type="keyword") |
||
35 | */ |
||
36 | private $domain; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | * |
||
41 | * @ES\Property(type="keyword") |
||
42 | */ |
||
43 | private $tags = []; |
||
44 | |||
45 | /** |
||
46 | * @var Message[] |
||
47 | * |
||
48 | * @ES\Embedded(class="ONGRTranslationsBundle:Message", multiple=true) |
||
49 | */ |
||
50 | private $messages = []; |
||
51 | |||
52 | /** |
||
53 | * @var string |
||
54 | * |
||
55 | * @ES\Property(type="keyword") |
||
56 | */ |
||
57 | private $key; |
||
58 | |||
59 | /** |
||
60 | * @var string |
||
61 | * |
||
62 | * @ES\Property(type="keyword") |
||
63 | */ |
||
64 | private $path; |
||
65 | |||
66 | /** |
||
67 | * @var string |
||
68 | * |
||
69 | * @ES\Property(type="text") |
||
70 | */ |
||
71 | private $description; |
||
72 | |||
73 | /** |
||
74 | * @var string |
||
75 | * |
||
76 | * @ES\Property(type="text") |
||
77 | */ |
||
78 | private $format; |
||
79 | |||
80 | /** |
||
81 | * @var \DateTime |
||
82 | * |
||
83 | 4 | * @ES\Property(type="date") |
|
84 | */ |
||
85 | 4 | private $createdAt; |
|
86 | 4 | ||
87 | 4 | /** |
|
88 | * @var \DateTime |
||
89 | * |
||
90 | * @ES\Property(type="date") |
||
91 | */ |
||
92 | 4 | private $updatedAt; |
|
93 | |||
94 | 4 | /** |
|
95 | * Sets timestamps. |
||
96 | */ |
||
97 | public function __construct() |
||
103 | 4 | ||
104 | /** |
||
105 | * Sets document unique id. |
||
106 | * |
||
107 | * @param string $documentId |
||
108 | * |
||
109 | * @return $this |
||
110 | */ |
||
111 | public function setId($documentId) |
||
117 | |||
118 | /** |
||
119 | * Returns document id. |
||
120 | 2 | * |
|
121 | * @return string |
||
122 | 2 | */ |
|
123 | public function getId() |
||
131 | |||
132 | /** |
||
133 | * @return string |
||
134 | */ |
||
135 | public function getDomain() |
||
139 | |||
140 | 4 | /** |
|
141 | * @param string $domain |
||
142 | */ |
||
143 | public function setDomain($domain) |
||
147 | |||
148 | 3 | /** |
|
149 | 3 | * Sets tags. |
|
150 | * |
||
151 | * @param array|string $tags |
||
152 | */ |
||
153 | public function setTags($tags) |
||
161 | |||
162 | 1 | /** |
|
163 | * Returns all tags. |
||
164 | * |
||
165 | * @return array |
||
166 | */ |
||
167 | public function getTags() |
||
171 | 4 | ||
172 | /** |
||
173 | * @return string |
||
174 | */ |
||
175 | public function getKey() |
||
179 | |||
180 | /** |
||
181 | * @param string $key |
||
182 | */ |
||
183 | public function setKey($key) |
||
187 | 1 | ||
188 | /** |
||
189 | * @param Message $message |
||
190 | */ |
||
191 | public function addMessage(Message $message) |
||
195 | |||
196 | /** |
||
197 | * @return Message[] |
||
198 | */ |
||
199 | public function getMessages() |
||
203 | 3 | ||
204 | /** |
||
205 | * @param Message[]|Collection $messages |
||
206 | */ |
||
207 | public function setMessages(Collection $messages = null) |
||
211 | |||
212 | /** |
||
213 | * @return string |
||
214 | */ |
||
215 | public function getPath() |
||
219 | 3 | ||
220 | /** |
||
221 | * @param string $path |
||
222 | */ |
||
223 | public function setPath($path) |
||
227 | |||
228 | /** |
||
229 | * @return string |
||
230 | */ |
||
231 | public function getDescription() |
||
235 | 1 | ||
236 | /** |
||
237 | * @param string $description |
||
238 | */ |
||
239 | public function setDescription($description) |
||
243 | |||
244 | /** |
||
245 | * @return string |
||
246 | */ |
||
247 | public function getFormat() |
||
251 | 1 | ||
252 | /** |
||
253 | * @param string $format |
||
254 | */ |
||
255 | public function setFormat($format) |
||
259 | 1 | ||
260 | /** |
||
261 | 1 | * @return \DateTime |
|
262 | 1 | */ |
|
263 | 1 | public function getCreatedAt() |
|
267 | |||
268 | /** |
||
269 | * @param \DateTime $createdAt |
||
270 | */ |
||
271 | public function setCreatedAt($createdAt) |
||
275 | |||
276 | /** |
||
277 | 1 | * @return \DateTime |
|
278 | */ |
||
279 | 1 | public function getUpdatedAt() |
|
283 | |||
284 | 1 | /** |
|
285 | * @param \DateTime $updatedAt |
||
286 | */ |
||
287 | public function setUpdatedAt($updatedAt) |
||
291 | |||
292 | 1 | /** |
|
293 | * {@inheritdoc} |
||
294 | 1 | */ |
|
295 | public function jsonSerialize() |
||
309 | |||
310 | /** |
||
311 | * Returns messages as array. |
||
312 | * |
||
313 | * Format: ['locale' => 'message']. |
||
314 | * |
||
315 | * @return array |
||
316 | */ |
||
317 | public function getMessagesArray() |
||
326 | |||
327 | /** |
||
328 | * @param string $locale |
||
329 | * @return Message|null |
||
330 | */ |
||
331 | public function getMessageByLocale($locale) |
||
341 | } |
||
342 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..