aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2015-12-08 09:20:03 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2015-12-08 09:20:03 +0100
commit347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e (patch)
tree23c7c5cee6aefbbf8ec058ac99f4729c7be4ac3e /src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php
parentc5d0db8b71a8c1bb6b5c08763b44e14b4f876d06 (diff)
downloadwallabag-347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e.tar.gz
wallabag-347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e.tar.zst
wallabag-347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e.zip
php cs
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php')
-rw-r--r--src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php b/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php
index 3f9953c0..fb2d1f87 100644
--- a/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php
+++ b/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php
@@ -3,7 +3,6 @@
3namespace Wallabag\CoreBundle\Helper; 3namespace Wallabag\CoreBundle\Helper;
4 4
5use RulerZ\RulerZ; 5use RulerZ\RulerZ;
6
7use Wallabag\CoreBundle\Entity\Entry; 6use Wallabag\CoreBundle\Entity\Entry;
8use Wallabag\CoreBundle\Entity\Tag; 7use Wallabag\CoreBundle\Entity\Tag;
9use Wallabag\CoreBundle\Repository\EntryRepository; 8use Wallabag\CoreBundle\Repository\EntryRepository;
@@ -18,8 +17,8 @@ class RuleBasedTagger
18 17
19 public function __construct(RulerZ $rulerz, TagRepository $tagRepository, EntryRepository $entryRepository) 18 public function __construct(RulerZ $rulerz, TagRepository $tagRepository, EntryRepository $entryRepository)
20 { 19 {
21 $this->rulerz = $rulerz; 20 $this->rulerz = $rulerz;
22 $this->tagRepository = $tagRepository; 21 $this->tagRepository = $tagRepository;
23 $this->entryRepository = $entryRepository; 22 $this->entryRepository = $entryRepository;
24 } 23 }
25 24
@@ -54,11 +53,11 @@ class RuleBasedTagger
54 */ 53 */
55 public function tagAllForUser(User $user) 54 public function tagAllForUser(User $user)
56 { 55 {
57 $rules = $this->getRulesForUser($user); 56 $rules = $this->getRulesForUser($user);
58 $entries = array(); 57 $entries = array();
59 58
60 foreach ($rules as $rule) { 59 foreach ($rules as $rule) {
61 $qb = $this->entryRepository->getBuilderForAllByUser($user->getId()); 60 $qb = $this->entryRepository->getBuilderForAllByUser($user->getId());
62 $entries = $this->rulerz->filter($qb, $rule->getRule()); 61 $entries = $this->rulerz->filter($qb, $rule->getRule());
63 62
64 foreach ($entries as $entry) { 63 foreach ($entries as $entry) {