aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php20
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php1
-rw-r--r--src/Wallabag/CoreBundle/Entity/Config.php9
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php8
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php3
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagV1Import.php2
6 files changed, 27 insertions, 16 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 459c4172..354a6f8e 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -60,7 +60,7 @@ class WallabagRestController extends FOSRestController
60 * } 60 * }
61 * ) 61 * )
62 * 62 *
63 * @return Entry 63 * @return Response
64 */ 64 */
65 public function getEntriesAction(Request $request) 65 public function getEntriesAction(Request $request)
66 { 66 {
@@ -101,7 +101,7 @@ class WallabagRestController extends FOSRestController
101 * } 101 * }
102 * ) 102 * )
103 * 103 *
104 * @return Entry 104 * @return Response
105 */ 105 */
106 public function getEntryAction(Entry $entry) 106 public function getEntryAction(Entry $entry)
107 { 107 {
@@ -124,7 +124,7 @@ class WallabagRestController extends FOSRestController
124 * } 124 * }
125 * ) 125 * )
126 * 126 *
127 * @return Entry 127 * @return Response
128 */ 128 */
129 public function postEntriesAction(Request $request) 129 public function postEntriesAction(Request $request)
130 { 130 {
@@ -166,7 +166,7 @@ class WallabagRestController extends FOSRestController
166 * } 166 * }
167 * ) 167 * )
168 * 168 *
169 * @return Entry 169 * @return Response
170 */ 170 */
171 public function patchEntriesAction(Entry $entry, Request $request) 171 public function patchEntriesAction(Entry $entry, Request $request)
172 { 172 {
@@ -211,7 +211,7 @@ class WallabagRestController extends FOSRestController
211 * } 211 * }
212 * ) 212 * )
213 * 213 *
214 * @return Entry 214 * @return Response
215 */ 215 */
216 public function deleteEntriesAction(Entry $entry) 216 public function deleteEntriesAction(Entry $entry)
217 { 217 {
@@ -235,6 +235,8 @@ class WallabagRestController extends FOSRestController
235 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} 235 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
236 * } 236 * }
237 * ) 237 * )
238 *
239 * @return Response
238 */ 240 */
239 public function getEntriesTagsAction(Entry $entry) 241 public function getEntriesTagsAction(Entry $entry)
240 { 242 {
@@ -257,6 +259,8 @@ class WallabagRestController extends FOSRestController
257 * {"name"="tags", "dataType"="string", "required"=false, "format"="tag1,tag2,tag3", "description"="a comma-separated list of tags."}, 259 * {"name"="tags", "dataType"="string", "required"=false, "format"="tag1,tag2,tag3", "description"="a comma-separated list of tags."},
258 * } 260 * }
259 * ) 261 * )
262 *
263 * @return Response
260 */ 264 */
261 public function postEntriesTagsAction(Request $request, Entry $entry) 265 public function postEntriesTagsAction(Request $request, Entry $entry)
262 { 266 {
@@ -286,6 +290,8 @@ class WallabagRestController extends FOSRestController
286 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} 290 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
287 * } 291 * }
288 * ) 292 * )
293 *
294 * @return Response
289 */ 295 */
290 public function deleteEntriesTagsAction(Entry $entry, Tag $tag) 296 public function deleteEntriesTagsAction(Entry $entry, Tag $tag)
291 { 297 {
@@ -306,6 +312,8 @@ class WallabagRestController extends FOSRestController
306 * Retrieve all tags. 312 * Retrieve all tags.
307 * 313 *
308 * @ApiDoc() 314 * @ApiDoc()
315 *
316 * @return Response
309 */ 317 */
310 public function getTagsAction() 318 public function getTagsAction()
311 { 319 {
@@ -328,6 +336,8 @@ class WallabagRestController extends FOSRestController
328 * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag"} 336 * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag"}
329 * } 337 * }
330 * ) 338 * )
339 *
340 * @return Response
331 */ 341 */
332 public function deleteTagAction(Tag $tag) 342 public function deleteTagAction(Tag $tag)
333 { 343 {
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 85c4ee90..e791d4dd 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -11,7 +11,6 @@ use Symfony\Component\Console\Output\NullOutput;
11use Symfony\Component\Console\Question\Question; 11use Symfony\Component\Console\Question\Question;
12use Symfony\Component\Console\Question\ConfirmationQuestion; 12use Symfony\Component\Console\Question\ConfirmationQuestion;
13use Symfony\Component\Console\Helper\Table; 13use Symfony\Component\Console\Helper\Table;
14use Wallabag\UserBundle\Entity\User;
15use Wallabag\CoreBundle\Entity\Config; 14use Wallabag\CoreBundle\Entity\Config;
16 15
17class InstallCommand extends ContainerAwareCommand 16class InstallCommand extends ContainerAwareCommand
diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php
index 2ca4182e..d3590f35 100644
--- a/src/Wallabag/CoreBundle/Entity/Config.php
+++ b/src/Wallabag/CoreBundle/Entity/Config.php
@@ -5,6 +5,7 @@ namespace Wallabag\CoreBundle\Entity;
5use Doctrine\Common\Collections\ArrayCollection; 5use Doctrine\Common\Collections\ArrayCollection;
6use Doctrine\ORM\Mapping as ORM; 6use Doctrine\ORM\Mapping as ORM;
7use Symfony\Component\Validator\Constraints as Assert; 7use Symfony\Component\Validator\Constraints as Assert;
8use Wallabag\UserBundle\Entity\User;
8 9
9/** 10/**
10 * Config. 11 * Config.
@@ -86,7 +87,7 @@ class Config
86 /* 87 /*
87 * @param User $user 88 * @param User $user
88 */ 89 */
89 public function __construct(\Wallabag\UserBundle\Entity\User $user) 90 public function __construct(User $user)
90 { 91 {
91 $this->user = $user; 92 $this->user = $user;
92 $this->taggingRules = new ArrayCollection(); 93 $this->taggingRules = new ArrayCollection();
@@ -181,7 +182,7 @@ class Config
181 * 182 *
182 * @return Config 183 * @return Config
183 */ 184 */
184 public function setUser(\Wallabag\UserBundle\Entity\User $user = null) 185 public function setUser(User $user = null)
185 { 186 {
186 $this->user = $user; 187 $this->user = $user;
187 188
@@ -225,7 +226,7 @@ class Config
225 /** 226 /**
226 * Set rssLimit. 227 * Set rssLimit.
227 * 228 *
228 * @param string $rssLimit 229 * @param int $rssLimit
229 * 230 *
230 * @return Config 231 * @return Config
231 */ 232 */
@@ -239,7 +240,7 @@ class Config
239 /** 240 /**
240 * Get rssLimit. 241 * Get rssLimit.
241 * 242 *
242 * @return string 243 * @return int
243 */ 244 */
244 public function getRssLimit() 245 public function getRssLimit()
245 { 246 {
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index b413c489..f11a7786 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -245,7 +245,7 @@ class Entry
245 /** 245 /**
246 * Set isArchived. 246 * Set isArchived.
247 * 247 *
248 * @param string $isArchived 248 * @param bool $isArchived
249 * 249 *
250 * @return Entry 250 * @return Entry
251 */ 251 */
@@ -259,7 +259,7 @@ class Entry
259 /** 259 /**
260 * Get isArchived. 260 * Get isArchived.
261 * 261 *
262 * @return string 262 * @return bool
263 */ 263 */
264 public function isArchived() 264 public function isArchived()
265 { 265 {
@@ -276,7 +276,7 @@ class Entry
276 /** 276 /**
277 * Set isStarred. 277 * Set isStarred.
278 * 278 *
279 * @param string $isStarred 279 * @param bool $isStarred
280 * 280 *
281 * @return Entry 281 * @return Entry
282 */ 282 */
@@ -290,7 +290,7 @@ class Entry
290 /** 290 /**
291 * Get isStarred. 291 * Get isStarred.
292 * 292 *
293 * @return string 293 * @return bool
294 */ 294 */
295 public function isStarred() 295 public function isStarred()
296 { 296 {
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php
index 853ad135..267c4af5 100644
--- a/src/Wallabag/ImportBundle/Import/PocketImport.php
+++ b/src/Wallabag/ImportBundle/Import/PocketImport.php
@@ -18,6 +18,7 @@ class PocketImport implements ImportInterface
18 private $em; 18 private $em;
19 private $contentProxy; 19 private $contentProxy;
20 private $logger; 20 private $logger;
21 private $client;
21 private $consumerKey; 22 private $consumerKey;
22 private $skippedEntries = 0; 23 private $skippedEntries = 0;
23 private $importedEntries = 0; 24 private $importedEntries = 0;
@@ -255,7 +256,7 @@ class PocketImport implements ImportInterface
255 256
256 // flush every 20 entries 257 // flush every 20 entries
257 if (($i % 20) === 0) { 258 if (($i % 20) === 0) {
258 $em->flush(); 259 $this->em->flush();
259 } 260 }
260 ++$i; 261 ++$i;
261 } 262 }
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
index aff5af40..0866ebe9 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
@@ -149,7 +149,7 @@ class WallabagV1Import implements ImportInterface
149 149
150 // flush every 20 entries 150 // flush every 20 entries
151 if (($i % 20) === 0) { 151 if (($i % 20) === 0) {
152 $em->flush(); 152 $this->em->flush();
153 } 153 }
154 ++$i; 154 ++$i;
155 } 155 }