1 | <?php |
||
22 | class Setting implements SerializableInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | * |
||
27 | * @ES\Id() |
||
28 | */ |
||
29 | private $id; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | * |
||
34 | * @ES\Property( |
||
35 | * type="keyword", |
||
36 | * options={ |
||
37 | * "fields"={ |
||
38 | * "raw"={"type"="keyword", "index"="not_analyzed"}, |
||
39 | * "name"={"type"="keyword"} |
||
40 | * } |
||
41 | * } |
||
42 | * ) |
||
43 | */ |
||
44 | private $name; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | * |
||
49 | * @ES\Property(type="text", options={"analyzer"="standard"}) |
||
50 | */ |
||
51 | private $description; |
||
52 | |||
53 | /** |
||
54 | * @var string |
||
55 | * |
||
56 | * @ES\Property( |
||
57 | * type="keyword", |
||
58 | * options={ |
||
59 | * "fields"={ |
||
60 | * "raw"={"type"="keyword", "index"="not_analyzed"}, |
||
61 | * "profile"={"type"="keyword"} |
||
62 | * } |
||
63 | * } |
||
64 | * ) |
||
65 | */ |
||
66 | private $profile = []; |
||
67 | |||
68 | /** |
||
69 | * @var string |
||
70 | * |
||
71 | * @ES\Property(type="keyword", options={"index"="not_analyzed"}) |
||
72 | */ |
||
73 | private $type; |
||
74 | |||
75 | /** |
||
76 | * @var string |
||
77 | * |
||
78 | * @ES\Property(type="keyword", options={"index"="not_analyzed"}) |
||
79 | */ |
||
80 | private $value; |
||
81 | |||
82 | /** |
||
83 | * @var string |
||
84 | * |
||
85 | * @ES\Property(type="keyword", options={"index"="not_analyzed"}) |
||
86 | */ |
||
87 | private $salt; |
||
88 | |||
89 | /** |
||
90 | * @var string |
||
91 | * |
||
92 | * @ES\Property(type="date") |
||
93 | */ |
||
94 | private $createdAt; |
||
95 | |||
96 | /** |
||
97 | * Setting constructor. |
||
98 | */ |
||
99 | public function __construct() |
||
100 | { |
||
101 | $this->createdAt = new \DateTime(); |
||
|
|||
102 | } |
||
103 | |||
104 | /** |
||
105 | * @return string |
||
106 | */ |
||
107 | public function getId() |
||
111 | |||
112 | /** |
||
113 | * @param string $id |
||
114 | */ |
||
115 | public function setId($id) |
||
119 | |||
120 | /** |
||
121 | * @return string |
||
122 | */ |
||
123 | public function getValue() |
||
127 | |||
128 | /** |
||
129 | * @param string $value |
||
130 | */ |
||
131 | public function setValue($value) |
||
135 | |||
136 | /** |
||
137 | * Get type. |
||
138 | * |
||
139 | * @return string |
||
140 | */ |
||
141 | public function getType() |
||
145 | |||
146 | /** |
||
147 | * Set type. |
||
148 | * |
||
149 | * @param string $type |
||
150 | */ |
||
151 | public function setType($type) |
||
155 | |||
156 | /** |
||
157 | * Get profile. |
||
158 | * |
||
159 | * @return string|array |
||
160 | */ |
||
161 | public function getProfile() |
||
165 | |||
166 | /** |
||
167 | * Set profile. |
||
168 | * |
||
169 | * @param string|array $profile |
||
170 | */ |
||
171 | public function setProfile($profile) |
||
175 | |||
176 | /** |
||
177 | * Get description. |
||
178 | * |
||
179 | * @return string |
||
180 | */ |
||
181 | public function getDescription() |
||
185 | |||
186 | /** |
||
187 | * Set description. |
||
188 | * |
||
189 | * @param string $description |
||
190 | */ |
||
191 | public function setDescription($description) |
||
195 | |||
196 | /** |
||
197 | * Get name. |
||
198 | * |
||
199 | * @return string |
||
200 | */ |
||
201 | public function getName() |
||
205 | |||
206 | /** |
||
207 | * Set name. |
||
208 | * |
||
209 | * @param string $name |
||
210 | */ |
||
211 | public function setName($name) |
||
215 | |||
216 | /** |
||
217 | * @return string |
||
218 | */ |
||
219 | public function getSalt() |
||
223 | |||
224 | /** |
||
225 | * @param string $salt |
||
226 | */ |
||
227 | public function setSalt($salt) |
||
231 | |||
232 | /** |
||
233 | * @return string |
||
234 | */ |
||
235 | public function getCreatedAt() |
||
236 | { |
||
237 | return $this->createdAt; |
||
238 | } |
||
239 | |||
240 | /** |
||
241 | * @param string $createdAt |
||
242 | */ |
||
243 | public function setCreatedAt($createdAt) |
||
244 | { |
||
245 | $this->createdAt = $createdAt; |
||
246 | } |
||
247 | |||
248 | /** |
||
249 | * Specify data which should be serialized to JSON. |
||
250 | * |
||
251 | * @return mixed Data which can be serialized by json_encode. |
||
252 | */ |
||
253 | public function getSerializableData() |
||
265 | } |
||
266 |
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..