@@ -12,8 +12,6 @@ |
||
12 | 12 | namespace PhraseanetSDK\Entity; |
13 | 13 | |
14 | 14 | use Doctrine\Common\Collections\ArrayCollection; |
15 | -use PhraseanetSDK\Annotation\ApiField as ApiField; |
|
16 | -use PhraseanetSDK\Annotation\ApiRelation as ApiRelation; |
|
17 | 15 | use PhraseanetSDK\EntityManager; |
18 | 16 | |
19 | 17 | class Query |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function getSuggestions() |
154 | 154 | { |
155 | - if (! isset($this->source->suggestions)) { |
|
155 | + if (!isset($this->source->suggestions)) { |
|
156 | 156 | $this->suggestions = new ArrayCollection(); |
157 | 157 | } |
158 | 158 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function getFacets() |
168 | 168 | { |
169 | - if (! isset($this->source->facets)) { |
|
169 | + if (!isset($this->source->facets)) { |
|
170 | 170 | $this->facets = new ArrayCollection(); |
171 | 171 | } |
172 | 172 |
@@ -12,8 +12,6 @@ |
||
12 | 12 | namespace PhraseanetSDK\Entity; |
13 | 13 | |
14 | 14 | use Doctrine\Common\Collections\ArrayCollection; |
15 | -use PhraseanetSDK\Annotation\ApiField as ApiField; |
|
16 | -use PhraseanetSDK\Annotation\ApiRelation as ApiRelation; |
|
17 | 15 | use PhraseanetSDK\EntityManager; |
18 | 16 | |
19 | 17 | class Story |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function getThumbnail() |
140 | 140 | { |
141 | - if (! isset($this->source->thumbnail)) { |
|
141 | + if (!isset($this->source->thumbnail)) { |
|
142 | 142 | return null; |
143 | 143 | } |
144 | 144 | |
@@ -191,8 +191,7 @@ discard block |
||
191 | 191 | public function getRecordCount() |
192 | 192 | { |
193 | 193 | return $this->recordCount !== null ? |
194 | - $this->recordCount : |
|
195 | - $this->recordCount = |
|
194 | + $this->recordCount : $this->recordCount = |
|
196 | 195 | (isset($this->source->record_count) ? $this->source->record_count : count($this->getRecords())); |
197 | 196 | } |
198 | 197 | |
@@ -201,7 +200,7 @@ discard block |
||
201 | 200 | */ |
202 | 201 | public function getRecords() |
203 | 202 | { |
204 | - if (! isset($this->source->records)) { |
|
203 | + if (!isset($this->source->records)) { |
|
205 | 204 | $this->records = new ArrayCollection(); |
206 | 205 | } |
207 | 206 | |
@@ -215,7 +214,7 @@ discard block |
||
215 | 214 | */ |
216 | 215 | public function getMetadata() |
217 | 216 | { |
218 | - if (! isset($this->source->metadata)) { |
|
217 | + if (!isset($this->source->metadata)) { |
|
219 | 218 | $this->metadata = new ArrayCollection(); |
220 | 219 | } |
221 | 220 | |
@@ -229,7 +228,7 @@ discard block |
||
229 | 228 | */ |
230 | 229 | public function getStatus() |
231 | 230 | { |
232 | - if (! isset($this->status)) { |
|
231 | + if (!isset($this->status)) { |
|
233 | 232 | $this->status = $this->entityManager->getRepository('recordStatus')->findByRecord( |
234 | 233 | $this->getDataboxId(), |
235 | 234 | $this->getStoryId() |
@@ -244,11 +243,11 @@ discard block |
||
244 | 243 | */ |
245 | 244 | public function getCaption() |
246 | 245 | { |
247 | - if (! isset($this->caption) && isset($this->source->caption)) { |
|
246 | + if (!isset($this->caption) && isset($this->source->caption)) { |
|
248 | 247 | $this->caption = RecordCaption::fromList((array) $this->source->caption); |
249 | 248 | } |
250 | 249 | |
251 | - if (! isset($this->caption)) { |
|
250 | + if (!isset($this->caption)) { |
|
252 | 251 | $this->caption = $this->entityManager->getRepository('caption')->findByRecord( |
253 | 252 | $this->getDataboxId(), |
254 | 253 | $this->getStoryId() |
@@ -70,6 +70,9 @@ |
||
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | + /** |
|
74 | + * @param string $message |
|
75 | + */ |
|
73 | 76 | private function output($message, OutputInterface $output = null) |
74 | 77 | { |
75 | 78 | if (null !== $output) { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * Retrieve the entry identified by its id |
23 | 23 | * |
24 | 24 | * @param integer $id The entry id |
25 | - * @return \PhraseanetSDK\Entity\Feed |
|
25 | + * @return FeedEntry |
|
26 | 26 | * @throws RuntimeException |
27 | 27 | */ |
28 | 28 | public function findById($id) |
@@ -14,7 +14,6 @@ |
||
14 | 14 | use PhraseanetSDK\Entity\FeedEntry; |
15 | 15 | use PhraseanetSDK\Exception\RuntimeException; |
16 | 16 | use Doctrine\Common\Collections\ArrayCollection; |
17 | -use PhraseanetSDK\EntityHydrator; |
|
18 | 17 | |
19 | 18 | class Entry extends AbstractRepository |
20 | 19 | { |
@@ -14,7 +14,6 @@ |
||
14 | 14 | use PhraseanetSDK\Exception\RuntimeException; |
15 | 15 | use PhraseanetSDK\Exception\NotFoundException; |
16 | 16 | use Doctrine\Common\Collections\ArrayCollection; |
17 | -use PhraseanetSDK\EntityHydrator; |
|
18 | 17 | |
19 | 18 | class Subdef extends AbstractRepository |
20 | 19 | { |
@@ -166,7 +166,7 @@ |
||
166 | 166 | */ |
167 | 167 | public function getValidationUsers() |
168 | 168 | { |
169 | - if (! $this->isValidationBasket()) { |
|
169 | + if (!$this->isValidationBasket()) { |
|
170 | 170 | return null; |
171 | 171 | } |
172 | 172 |
@@ -110,7 +110,7 @@ |
||
110 | 110 | */ |
111 | 111 | public function getValidationChoices() |
112 | 112 | { |
113 | - if (! isset($this->source->validation_choices)) { |
|
113 | + if (!isset($this->source->validation_choices)) { |
|
114 | 114 | $this->validationChoices = new ArrayCollection(); |
115 | 115 | } |
116 | 116 |
@@ -146,7 +146,7 @@ |
||
146 | 146 | */ |
147 | 147 | public function getItems() |
148 | 148 | { |
149 | - if (! isset($this->source->items)) { |
|
149 | + if (!isset($this->source->items)) { |
|
150 | 150 | $this->items = new ArrayCollection(); |
151 | 151 | } |
152 | 152 |
@@ -63,7 +63,7 @@ |
||
63 | 63 | */ |
64 | 64 | public function getValues() |
65 | 65 | { |
66 | - if (! isset($this->source->values)) { |
|
66 | + if (!isset($this->source->values)) { |
|
67 | 67 | $this->values = new ArrayCollection(); |
68 | 68 | } |
69 | 69 |