Code Duplication    Length = 4-4 lines in 2 locations

Entity/Repository/SubscriptionRepository.php 1 location

@@ 50-53 (lines=4) @@
47
                ->setParameter('type', $criteria->type);
48
        }
49
50
        foreach ($criteria->perametersOperators as $key => $operator) {
51
            $qb->andWhere('s.'.$key.' = :'.$key)
52
                ->setParameter($key, $criteria->$key);
53
        }
54
55
        $metadata = $this->getClassMetadata();
56
        foreach ($criteria->orderBy as $key => $order) {

Entity/Repository/UserSubscriptionRepository.php 1 location

@@ 78-81 (lines=4) @@
75
            }
76
        }
77
78
        foreach ($criteria->perametersOperators as $key => $operator) {
79
            $qb->andWhere('s.'.$key.' = :'.$key)
80
                ->setParameter($key, $criteria->$key);
81
        }
82
83
        if (!empty($criteria->query)) {
84
            $qb->andWhere($qb->expr()->orX('(u.username LIKE :query)', '(p.name LIKE :query)'));