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

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