Code Duplication    Length = 11-13 lines in 2 locations

ODM/LiveJobsGridSource.php 1 location

@@ 79-89 (lines=11) @@
76
        return null;
77
    }
78
79
    protected function getQueryBuilder()
80
    {
81
        if ($this->isRunning()) {
82
            return $this->getRunningQueryBuilder();
83
        }
84
        $builder = $this->jobManager->getJobQueryBuilder();
85
        $builder->limit($this->limit);
86
        $builder->skip($this->offset);
87
88
        return $builder;
89
    }
90
}
91

ORM/LiveJobsGridSource.php 1 location

@@ 62-74 (lines=13) @@
59
        return $queryBuilder;
60
    }
61
62
    protected function getQueryBuilder()
63
    {
64
        if ($this->isRunning()) {
65
            return $this->getRunningQueryBuilder();
66
        }
67
68
        $queryBuilder = $this->jobManager->getJobQueryBuilder();
69
        $queryBuilder->add('select', 'j');
70
        $queryBuilder->setFirstResult($this->offset)
71
                     ->setMaxResults($this->limit);
72
73
        return $queryBuilder;
74
    }
75
76
    public function autoDiscoverColumns()
77
    {