@@ -93,13 +93,13 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function requestPasswordReset(string $emailAddress): string |
95 | 95 | { |
96 | - $response = $this->query('POST', 'v1/accounts/reset-password/' . urlencode($emailAddress) . '/'); |
|
96 | + $response = $this->query('POST', 'v1/accounts/reset-password/'.urlencode($emailAddress).'/'); |
|
97 | 97 | |
98 | 98 | if (!$response->hasProperty('reset_token')) { |
99 | 99 | throw new RuntimeException('Missing "token" property in response content'); |
100 | 100 | } |
101 | 101 | |
102 | - return (string)$response->getProperty('reset_token'); |
|
102 | + return (string) $response->getProperty('reset_token'); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function resetPassword(string $token, string $password): bool |
115 | 115 | { |
116 | - $response = $this->query('POST', 'v1/accounts/update-password/' . $token . '/', array(), array( |
|
116 | + $response = $this->query('POST', 'v1/accounts/update-password/'.$token.'/', array(), array( |
|
117 | 117 | 'password' => $password |
118 | 118 | )); |
119 | 119 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | throw new RuntimeException('Missing "success" property in response content'); |
122 | 122 | } |
123 | 123 | |
124 | - return (bool)$response->getProperty('success'); |
|
124 | + return (bool) $response->getProperty('success'); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | throw new RuntimeException('Missing "success" property in response content'); |
147 | 147 | } |
148 | 148 | |
149 | - return (bool)$response->getProperty('success'); |
|
149 | + return (bool) $response->getProperty('success'); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | throw new RuntimeException('Missing "token" property in response content'); |
194 | 194 | } |
195 | 195 | |
196 | - return (string)$response->getProperty('token'); |
|
196 | + return (string) $response->getProperty('token'); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | public function updateUser(UserEntity $user) |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | throw new RuntimeException('Missing "success" property in response content'); |
223 | 223 | } |
224 | 224 | |
225 | - return (bool)$response->getProperty('success'); |
|
225 | + return (bool) $response->getProperty('success'); |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | /** |
@@ -244,12 +244,12 @@ discard block |
||
244 | 244 | */ |
245 | 245 | public function unlockAccount(string $token): bool |
246 | 246 | { |
247 | - $response = $this->query('POST', 'v1/accounts/unlock/' . $token . '/'); |
|
247 | + $response = $this->query('POST', 'v1/accounts/unlock/'.$token.'/'); |
|
248 | 248 | |
249 | 249 | if (!$response->hasProperty('success')) { |
250 | 250 | throw new \RuntimeException('Missing "success" property in response content'); |
251 | 251 | } |
252 | 252 | |
253 | - return (bool)$response->getProperty('success'); |
|
253 | + return (bool) $response->getProperty('success'); |
|
254 | 254 | } |
255 | 255 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | */ |
57 | 57 | public function getStatusCode(): int |
58 | 58 | { |
59 | - return (int)$this->meta->http_code; |
|
59 | + return (int) $this->meta->http_code; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function isValidationItem(): bool |
100 | 100 | { |
101 | - return (bool)$this->source->validation_item; |
|
101 | + return (bool) $this->source->validation_item; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function getValidationChoices() |
121 | 121 | { |
122 | - if (! isset($this->source->validation_choices)) { |
|
122 | + if (!isset($this->source->validation_choices)) { |
|
123 | 123 | $this->validationChoices = new ArrayCollection(); |
124 | 124 | } |
125 | 125 |
@@ -183,7 +183,7 @@ |
||
183 | 183 | */ |
184 | 184 | public function getValidationUsers(): ?ArrayCollection |
185 | 185 | { |
186 | - if (! $this->isValidationBasket()) { |
|
186 | + if (!$this->isValidationBasket()) { |
|
187 | 187 | return null; |
188 | 188 | } |
189 | 189 |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function getId(): string |
113 | 113 | { |
114 | - return $this->getDataboxId() . '_' . $this->getRecordId(); |
|
114 | + return $this->getDataboxId().'_'.$this->getRecordId(); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | */ |
225 | 225 | public function getThumbnail(): ?Subdef |
226 | 226 | { |
227 | - if (! isset($this->source->thumbnail)) { |
|
227 | + if (!isset($this->source->thumbnail)) { |
|
228 | 228 | return null; |
229 | 229 | } |
230 | 230 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | public function getTechnicalInformation() |
260 | 260 | { |
261 | - if (! isset($this->source->technical_informations)) { |
|
261 | + if (!isset($this->source->technical_informations)) { |
|
262 | 262 | $this->technicalInformation = new ArrayCollection(); |
263 | 263 | } |
264 | 264 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | */ |
275 | 275 | public function getSubdefs() |
276 | 276 | { |
277 | - if (! isset($this->source->subdefs)) { |
|
277 | + if (!isset($this->source->subdefs)) { |
|
278 | 278 | $this->subdefs = new ArrayCollection(); |
279 | 279 | } |
280 | 280 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | */ |
287 | 287 | public function getStatus() |
288 | 288 | { |
289 | - if (! isset($this->source->status)) { |
|
289 | + if (!isset($this->source->status)) { |
|
290 | 290 | $this->status = new ArrayCollection(); |
291 | 291 | } |
292 | 292 | |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | */ |
299 | 299 | public function getCaption() |
300 | 300 | { |
301 | - if (! isset($this->source->caption)) { |
|
301 | + if (!isset($this->source->caption)) { |
|
302 | 302 | $this->caption = new ArrayCollection(); |
303 | 303 | } |
304 | 304 | |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | public function getMetadata() |
312 | 312 | { |
313 | - if (! isset($this->source->metadata)) { |
|
313 | + if (!isset($this->source->metadata)) { |
|
314 | 314 | $this->metadata = new ArrayCollection(); |
315 | 315 | } |
316 | 316 |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function getThumbnail(): ?Subdef |
155 | 155 | { |
156 | - if (! isset($this->source->thumbnail)) { |
|
156 | + if (!isset($this->source->thumbnail)) { |
|
157 | 157 | return null; |
158 | 158 | } |
159 | 159 | |
@@ -208,8 +208,7 @@ discard block |
||
208 | 208 | public function getRecordCount(): int |
209 | 209 | { |
210 | 210 | return $this->recordCount !== null ? |
211 | - $this->recordCount : |
|
212 | - $this->recordCount = |
|
211 | + $this->recordCount : $this->recordCount = |
|
213 | 212 | (isset($this->source->record_count) ? $this->source->record_count : count($this->getRecords())); |
214 | 213 | } |
215 | 214 | |
@@ -218,7 +217,7 @@ discard block |
||
218 | 217 | */ |
219 | 218 | public function getRecords() |
220 | 219 | { |
221 | - if (! isset($this->source->records)) { |
|
220 | + if (!isset($this->source->records)) { |
|
222 | 221 | $this->records = new ArrayCollection(); |
223 | 222 | } |
224 | 223 | |
@@ -232,7 +231,7 @@ discard block |
||
232 | 231 | */ |
233 | 232 | public function getMetadata() |
234 | 233 | { |
235 | - if (! isset($this->source->metadata)) { |
|
234 | + if (!isset($this->source->metadata)) { |
|
236 | 235 | $this->metadata = new ArrayCollection(); |
237 | 236 | } |
238 | 237 | |
@@ -249,7 +248,7 @@ discard block |
||
249 | 248 | */ |
250 | 249 | public function getStatus() |
251 | 250 | { |
252 | - if (! isset($this->status)) { |
|
251 | + if (!isset($this->status)) { |
|
253 | 252 | /** @var RecordStatusRepository $repo */ |
254 | 253 | $repo = $this->entityManager->getRepository('recordStatus'); |
255 | 254 | $this->status = $repo->findByRecord( |
@@ -269,11 +268,11 @@ discard block |
||
269 | 268 | */ |
270 | 269 | public function getCaption() |
271 | 270 | { |
272 | - if (! isset($this->caption) && isset($this->source->caption)) { |
|
271 | + if (!isset($this->caption) && isset($this->source->caption)) { |
|
273 | 272 | $this->caption = RecordCaption::fromList((array) $this->source->caption); |
274 | 273 | } |
275 | 274 | |
276 | - if (! isset($this->caption)) { |
|
275 | + if (!isset($this->caption)) { |
|
277 | 276 | /** @var CaptionRepository $repo */ |
278 | 277 | $repo = $this->entityManager->getRepository('caption'); |
279 | 278 | $this->caption = $repo->findByRecord( |