Code Duplication    Length = 10-12 lines in 2 locations

module/Jobs/src/Jobs/Repository/Job.php 1 location

@@ 48-59 (lines=12) @@
45
     * @return bool
46
     * @throws \Doctrine\ODM\MongoDB\MongoDBException
47
     */
48
    public function existsApplyId($applyId)
49
    {
50
        $qb = $this->createQueryBuilder();
51
        $qb->hydrate(false)
52
           ->select('applyId')
53
           ->field('applyId')->equals($applyId);
54
           
55
        $result = $qb->getQuery()->execute();
56
        $count = $result->count();
57
        return (bool) $count;
58
    }
59
60
    /**
61
     * @param $resourceId
62
     * @return array

module/Organizations/src/Organizations/Repository/Organization.php 1 location

@@ 184-193 (lines=10) @@
181
        return $collection;
182
    }
183
184
    public function getEmployersCursor(UserInterface $user)
185
    {
186
        $qb = $this->createQueryBuilder();
187
        $qb->field('refs.employees')->equals($user->getId());
188
189
        $q  = $qb->getQuery();
190
        $c  = $q->execute();
191
192
        return $c;
193
    }
194
195
    public function create(array $data = null)
196
    {