Code Duplication    Length = 16-16 lines in 2 locations

Controller/QueueController.php 2 locations

@@ 171-186 (lines=16) @@
168
     *
169
     * @throws UnsupportedException
170
     */
171
    public function jobsAction()
172
    {
173
        $this->validateManagerType('dtc_queue.manager.job');
174
        $managerType = $this->container->getParameter('dtc_queue.manager.job');
175
        $rendererFactory = $this->get('dtc_grid.renderer.factory');
176
        $renderer = $rendererFactory->create('datatables');
177
        $gridSource = $this->get('dtc_queue.grid_source.jobs_waiting.'.('mongodb' === $managerType ? 'odm' : $managerType));
178
        $renderer->bind($gridSource);
179
        $params = $renderer->getParams();
180
        $this->addCssJs($params);
181
182
        $params['worker_methods'] = $this->get('dtc_queue.manager.job')->getWorkersAndMethods();
183
        $params['prompt_message'] = 'This will archive all non-running jobs';
184
185
        return $params;
186
    }
187
188
    /**
189
     * List jobs in system by default.
@@ 194-209 (lines=16) @@
191
     * @Template("@DtcQueue/Queue/jobs_running.html.twig")
192
     * @Route("/jobs_running", name="dtc_queue_jobs_running")
193
     */
194
    public function runningJobsAction()
195
    {
196
        $this->validateManagerType('dtc_queue.manager.job');
197
        $managerType = $this->container->getParameter('dtc_queue.manager.job');
198
        $rendererFactory = $this->get('dtc_grid.renderer.factory');
199
        $renderer = $rendererFactory->create('datatables');
200
        $gridSource = $this->get('dtc_queue.grid_source.jobs_running.'.('mongodb' === $managerType ? 'odm' : $managerType));
201
        $renderer->bind($gridSource);
202
        $params = $renderer->getParams();
203
        $this->addCssJs($params);
204
205
        $params['worker_methods'] = $this->get('dtc_queue.manager.job')->getWorkersAndMethods(BaseJob::STATUS_RUNNING);
206
        $params['prompt_message'] = 'This will prune all stalled jobs';
207
208
        return $params;
209
    }
210
211
    /**
212
     * @param string $class1