Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 27-35 (lines=9) @@
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public function findBy(array $criteria, array $sort = null, $limit = null, $skip = null)
28
    {
29
        if (!array_key_exists('isDraft', $criteria)) {
30
            $criteria['isDraft'] = false;
31
        } elseif (null === $criteria['isDraft']) {
32
            unset($criteria['isDraft']);
33
        }
34
        return parent::findBy($criteria, $sort, $limit, $skip);
35
    }
36
37
    /**
38
     * {@inheritDoc}

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

@@ 30-38 (lines=9) @@
27
    /**
28
     * {@inheritDoc}
29
     */
30
    public function findBy(array $criteria, array $sort = null, $limit = null, $skip = null)
31
    {
32
        if (!array_key_exists('isDraft', $criteria)) {
33
            $criteria['isDraft'] = false;
34
        } elseif (null === $criteria['isDraft']) {
35
            unset($criteria['isDraft']);
36
        }
37
        return parent::findBy($criteria, $sort, $limit, $skip);
38
    }
39
    
40
    /**
41
     * {@inheritDoc}