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

@@ 62-73 (lines=12) @@
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function findAll($page = 1, $pageSize = null)
63
    {
64
        $query = $this->createQueryBuilder('t')
65
            ->getQuery();
66
67
        if ($pageSize) {
68
            $query->setMaxResults($pageSize);
69
            $query->setFirstResult(($page - 1) * $pageSize);
70
        }
71
72
        return $query->getResult();
73
    }
74
75
    /**
76
     * {@inheritdoc}