]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
CS
authorJeremy Benoist <jeremy.benoist@gmail.com>
Sat, 8 Oct 2016 09:14:09 +0000 (11:14 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Sat, 22 Oct 2016 11:13:07 +0000 (13:13 +0200)
src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
src/Wallabag/CoreBundle/Controller/ConfigController.php
src/Wallabag/CoreBundle/Repository/EntryRepository.php
src/Wallabag/CoreBundle/Subscriber/SQLiteCascadeDeleteSubscriber.php

index d999dc0f3c756bc85db536930f5666d6c5c011e4..c81a2614b07c85f7c02f981eeadadb67189d2a7c 100644 (file)
@@ -109,9 +109,9 @@ class AnnotationRepository extends EntityRepository
 
     /**
      * Remove all annotations for a user id.
-     * Used when a user want to reset all informations
+     * Used when a user want to reset all informations.
      *
-     * @param  int $userId
+     * @param int $userId
      */
     public function removeAllByUserId($userId)
     {
index e2484064a3e85c1d7b90c5ffe6a634d996994f8e..8d391917ad83016fc2adf2cdc63fb38fc29fc875 100644 (file)
@@ -253,7 +253,7 @@ class ConfigController extends Controller
                     $this->getDoctrine()->getRepository('WallabagAnnotationBundle:Annotation')->removeAllByUserId($this->getUser()->getId());
                 }
 
-                // manually remove tags first to avoid orphan tag
+                // manually remove tags to avoid orphan tag
                 $this->removeAllTagsByUserId($this->getUser()->getId());
 
                 $this->getDoctrine()
@@ -270,9 +270,9 @@ class ConfigController extends Controller
     }
 
     /**
-     * Remove all tags for a given user and cleanup orphan tags
+     * Remove all tags for a given user and cleanup orphan tags.
      *
-     * @param  int $userId
+     * @param int $userId
      */
     private function removeAllTagsByUserId($userId)
     {
@@ -286,6 +286,7 @@ class ConfigController extends Controller
             ->getRepository('WallabagCoreBundle:Entry')
             ->removeTags($userId, $tags);
 
+        // cleanup orphan tags
         $em = $this->getDoctrine()->getManager();
 
         foreach ($tags as $tag) {
index 8704a2a6d2fb1062f3b17c2b36b016349c55d563..5df5eff502aa03ed2e5a24a6a2f49dff320907d2 100644 (file)
@@ -332,9 +332,9 @@ class EntryRepository extends EntityRepository
 
     /**
      * Remove all entries for a user id.
-     * Used when a user want to reset all informations
+     * Used when a user want to reset all informations.
      *
-     * @param  int $userId
+     * @param int $userId
      */
     public function removeAllByUserId($userId)
     {
index d51805770c847383037ae9338c5db8329036691e..f7210bd3b60f8e698df0d394a217649eadec73b7 100644 (file)
@@ -1,8 +1,8 @@
 <?php
+
 namespace Wallabag\CoreBundle\Subscriber;
 
 use Doctrine\Common\EventSubscriber;
-use Doctrine\ORM\EntityManager;
 use Doctrine\ORM\Event\LifecycleEventArgs;
 use Wallabag\CoreBundle\Entity\Entry;
 use Doctrine\Bundle\DoctrineBundle\Registry;
@@ -38,7 +38,7 @@ class SQLiteCascadeDeleteSubscriber implements EventSubscriber
 
     /**
      * We removed everything related to the upcoming removed entry because SQLite can't handle it on it own.
-     * We do it in the preRemove, because we can't retrieve tags in the postRemove (because the entry id is gone)
+     * We do it in the preRemove, because we can't retrieve tags in the postRemove (because the entry id is gone).
      *
      * @param LifecycleEventArgs $args
      */