@@ -74,13 +74,13 @@ |
||
74 | 74 | * Search for records |
75 | 75 | * |
76 | 76 | * @param array $parameters Query parameters |
77 | - * @param int $pAPINumber API number (e.g. 3) |
|
77 | + * @param int $pAPINumber API number (e.g. 3) |
|
78 | 78 | * @return \PhraseanetSDK\Entity\Query object |
79 | 79 | * @throws RuntimeException |
80 | 80 | */ |
81 | 81 | public function search(array $parameters = array(), $pAPINumber = 1) |
82 | 82 | { |
83 | - $response = $this->query('POST', 'v'.$pAPINumber.'/searchraw/', array(), array_merge( |
|
83 | + $response = $this->query('POST', 'v'.$pAPINumber.'/searchraw/', array(), array_merge( |
|
84 | 84 | array('search_type' => 0), |
85 | 85 | $parameters |
86 | 86 | )); |
@@ -99,8 +99,8 @@ |
||
99 | 99 | $results->results->stories = []; |
100 | 100 | $results->count = $res->count; |
101 | 101 | $results->total = $res->total; |
102 | - $results->limit = isset($res->limit) ? $res->limit : 10; // TODO: just $res->limit after a phraseanet PR in searchraw |
|
103 | - $results->offset = isset($res->offset) ? $res->offset : 0; // TODO: just $res->offset after a phraseanet PR |
|
102 | + $results->limit = isset($res->limit) ? $res->limit : 10; // TODO: just $res->limit after a phraseanet PR in searchraw |
|
103 | + $results->offset = isset($res->offset) ? $res->offset : 0; // TODO: just $res->offset after a phraseanet PR |
|
104 | 104 | } |
105 | 105 | |
106 | 106 |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * Search for stories |
69 | 69 | * |
70 | 70 | * @param array $parameters Query parameters |
71 | - * @param int $pAPINumber API number (e.g. 3) |
|
71 | + * @param int $pAPINumber API number (e.g. 3) |
|
72 | 72 | * @return \PhraseanetSDK\Entity\Query object |
73 | 73 | * @throws RuntimeException |
74 | 74 | */ |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | { |
77 | 77 | $response = $this->query('POST', 'v'.$pAPINumber.'/searchraw/', array(), array_merge( |
78 | 78 | $parameters, |
79 | - array('search_type' => SearchResult::TYPE_STORY) |
|
79 | + array('search_type' => SearchResult::TYPE_STORY) |
|
80 | 80 | )); |
81 | 81 | |
82 | 82 | if ($response->isEmpty()) { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $name = $key; |
32 | 32 | $value->name = $name; |
33 | 33 | } else { |
34 | - $name = $value->name; |
|
34 | + $name = $value->name; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | $subdefs[$name] = self::fromValue($value); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function getFileSize() |
119 | 119 | { |
120 | - return isset($this->source->size) ? $this->source->size : $this->source->filesize ; |
|
120 | + return isset($this->source->size) ? $this->source->size : $this->source->filesize; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function getId() |
109 | 109 | { |
110 | - return $this->getDataboxId() . '_' . $this->getRecordId(); |
|
110 | + return $this->getDataboxId().'_'.$this->getRecordId(); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | */ |
278 | 278 | public function getSubdefs() |
279 | 279 | { |
280 | - if (! isset($this->source->subdefs)) { |
|
280 | + if (!isset($this->source->subdefs)) { |
|
281 | 281 | $this->subdefs = new ArrayCollection(); |
282 | 282 | } else { |
283 | 283 | $subdefs = $this->source->subdefs; |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | */ |
295 | 295 | public function getStatus() |
296 | 296 | { |
297 | - if (! isset($this->source->status)) { |
|
297 | + if (!isset($this->source->status)) { |
|
298 | 298 | $this->status = new ArrayCollection(); |
299 | 299 | } |
300 | 300 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | */ |
307 | 307 | public function getCaption() |
308 | 308 | { |
309 | - if (! isset($this->source->caption)) { |
|
309 | + if (!isset($this->source->caption)) { |
|
310 | 310 | $this->caption = new ArrayCollection(); |
311 | 311 | } else { |
312 | 312 | $caption = $this->source->caption; |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | */ |
324 | 324 | public function getMetadata() |
325 | 325 | { |
326 | - if (! isset($this->source->metadata)) { |
|
326 | + if (!isset($this->source->metadata)) { |
|
327 | 327 | $this->metadata = new ArrayCollection(); |
328 | 328 | } |
329 | 329 |
@@ -196,8 +196,7 @@ discard block |
||
196 | 196 | public function getRecordCount() |
197 | 197 | { |
198 | 198 | return $this->recordCount !== null ? |
199 | - $this->recordCount : |
|
200 | - $this->recordCount = |
|
199 | + $this->recordCount : $this->recordCount = |
|
201 | 200 | (isset($this->source->record_count) ? $this->source->record_count : count($this->getRecords())); |
202 | 201 | } |
203 | 202 | |
@@ -206,7 +205,7 @@ discard block |
||
206 | 205 | */ |
207 | 206 | public function getRecords() |
208 | 207 | { |
209 | - if (! isset($this->source->records)) { |
|
208 | + if (!isset($this->source->records)) { |
|
210 | 209 | $this->records = new ArrayCollection(); |
211 | 210 | } |
212 | 211 | |
@@ -220,7 +219,7 @@ discard block |
||
220 | 219 | */ |
221 | 220 | public function getMetadata() |
222 | 221 | { |
223 | - if (! isset($this->source->metadata)) { |
|
222 | + if (!isset($this->source->metadata)) { |
|
224 | 223 | $this->metadata = new ArrayCollection(); |
225 | 224 | } |
226 | 225 | |
@@ -234,7 +233,7 @@ discard block |
||
234 | 233 | */ |
235 | 234 | public function getStatus() |
236 | 235 | { |
237 | - if (! isset($this->status)) { |
|
236 | + if (!isset($this->status)) { |
|
238 | 237 | $this->status = $this->entityManager->getRepository('recordStatus')->findByRecord( |
239 | 238 | $this->getDataboxId(), |
240 | 239 | $this->getStoryId() |
@@ -249,7 +248,7 @@ discard block |
||
249 | 248 | */ |
250 | 249 | public function getCaption() |
251 | 250 | { |
252 | - if (! isset($this->caption) && isset($this->source->caption)) { |
|
251 | + if (!isset($this->caption) && isset($this->source->caption)) { |
|
253 | 252 | $caption = $this->source->caption; |
254 | 253 | if (is_object($this->source->caption)) { |
255 | 254 | $caption = get_object_vars($this->source->caption); |
@@ -258,7 +257,7 @@ discard block |
||
258 | 257 | $this->caption = RecordCaption::fromList($caption); |
259 | 258 | } |
260 | 259 | |
261 | - if (! isset($this->caption)) { |
|
260 | + if (!isset($this->caption)) { |
|
262 | 261 | $this->caption = $this->entityManager->getRepository('caption')->findByRecord( |
263 | 262 | $this->getDataboxId(), |
264 | 263 | $this->getStoryId() |
@@ -87,6 +87,6 @@ |
||
87 | 87 | */ |
88 | 88 | public function getUrl() |
89 | 89 | { |
90 | - return isset($this->source->url) ? $this->source->url : '' ; |
|
90 | + return isset($this->source->url) ? $this->source->url : ''; |
|
91 | 91 | } |
92 | 92 | } |