Code Duplication    Length = 12-13 lines in 2 locations

src/Entity/TaskExecutionRepository.php 1 location

@@ 57-69 (lines=13) @@
54
    /**
55
     * {@inheritdoc}
56
     */
57
    public function findAll($page = 1, $pageSize = null)
58
    {
59
        $query = $this->createQueryBuilder('e')
60
            ->innerJoin('e.task', 't')
61
            ->getQuery();
62
63
        if ($pageSize) {
64
            $query->setMaxResults($pageSize);
65
            $query->setFirstResult(($page - 1) * $pageSize);
66
        }
67
68
        return $query->getResult();
69
    }
70
71
    /**
72
     * {@inheritdoc}

src/Entity/TaskRepository.php 1 location

@@ 54-65 (lines=12) @@
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function findAll($page = 1, $pageSize = null)
55
    {
56
        $query = $this->createQueryBuilder('t')
57
            ->getQuery();
58
59
        if ($pageSize) {
60
            $query->setMaxResults($pageSize);
61
            $query->setFirstResult(($page - 1) * $pageSize);
62
        }
63
64
        return $query->getResult();
65
    }
66
67
    /**
68
     * {@inheritdoc}