aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller/TagRestController.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller/TagRestController.php')
-rw-r--r--src/Wallabag/ApiBundle/Controller/TagRestController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/TagRestController.php b/src/Wallabag/ApiBundle/Controller/TagRestController.php
index 9d333fe4..c6d6df6a 100644
--- a/src/Wallabag/ApiBundle/Controller/TagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/TagRestController.php
@@ -138,14 +138,14 @@ class TagRestController extends WallabagRestController
138 */ 138 */
139 private function cleanOrphanTag($tags) 139 private function cleanOrphanTag($tags)
140 { 140 {
141 if (!is_array($tags)) { 141 if (!\is_array($tags)) {
142 $tags = [$tags]; 142 $tags = [$tags];
143 } 143 }
144 144
145 $em = $this->getDoctrine()->getManager(); 145 $em = $this->getDoctrine()->getManager();
146 146
147 foreach ($tags as $tag) { 147 foreach ($tags as $tag) {
148 if (0 === count($tag->getEntries())) { 148 if (0 === \count($tag->getEntries())) {
149 $em->remove($tag); 149 $em->remove($tag);
150 } 150 }
151 } 151 }