Code Duplication    Length = 8-12 lines in 3 locations

module/Auth/src/Auth/Repository/User.php 1 location

@@ 82-89 (lines=8) @@
79
    /**
80
     * {@inheritDoc}
81
     */
82
    public function createQueryBuilder($findDrafts = false)
83
    {
84
        $qb = parent::createQueryBuilder();
85
        if (null !== $findDrafts) {
86
            $qb->field('isDraft')->equals($findDrafts);
87
        }
88
        return $qb;
89
    }
90
91
    /**
92
     * Creates a User

module/Core/src/Core/Repository/DraftableEntityAwareTrait.php 1 location

@@ 101-112 (lines=12) @@
98
     *
99
     * @return \Doctrine\MongoDB\Query\Builder
100
     */
101
    public function createQueryBuilder($findDrafts = false)
102
    {
103
        /* @var \Doctrine\MongoDB\Query\Builder $qb */
104
        /** @noinspection PhpUndefinedClassInspection */
105
        /** @noinspection PhpUndefinedMethodInspection */
106
        $qb = parent::createQueryBuilder();
107
108
        if (null !== $findDrafts) {
109
            $qb->field('isDraft')->equals($findDrafts);
110
        }
111
        return $qb;
112
    }
113
114
    /**
115
     * Creates an entity in draft mode.

module/Applications/src/Applications/Repository/Application.php 1 location

@@ 60-67 (lines=8) @@
57
    /**
58
     * {@inheritDoc}
59
     */
60
    public function createQueryBuilder($findDrafts = false)
61
    {
62
        $qb = parent::createQueryBuilder();
63
        if (null !== $findDrafts) {
64
            $qb->field('isDraft')->equals($findDrafts);
65
        }
66
        return $qb;
67
    }
68
    
69
    /**
70
     * Gets a pointer to an application