Code Duplication    Length = 17-17 lines in 2 locations

src/Admin/presenters/InvestformPresenter.php 2 locations

@@ 337-353 (lines=17) @@
334
        ));
335
    }
336
337
    public function actionPaid($id, $idPage)
338
    {
339
        $investment = $this->em->getRepository('\WebCMS\InvestformModule\Entity\Investment')->find($id);
340
341
        if ($investment->getContractClosed()) {
342
            $investment->setContractPaid($investment->getContractPaid() ? false : true);
343
344
            $this->em->flush();
345
346
            $this->flashMessage('Parameter has been changed.', 'success');
347
        } else {
348
            $this->flashMessage('Contract must be closed first.', 'error');
349
        }
350
        $this->forward('default', array(
351
            'idPage' => $this->actualPage->getId()
352
        ));
353
    }
354
355
    public function actionClosed($id, $idPage)
356
    {
@@ 355-371 (lines=17) @@
352
        ));
353
    }
354
355
    public function actionClosed($id, $idPage)
356
    {
357
        $investment = $this->em->getRepository('\WebCMS\InvestformModule\Entity\Investment')->find($id);
358
359
        if ($investment->getContractSend()) {
360
            $investment->setContractClosed($investment->getContractClosed() ? false : true);
361
362
            $this->em->flush();
363
364
            $this->flashMessage('Parameter has been changed.', 'success');
365
        } else {
366
            $this->flashMessage('Contract must be sent first.', 'error');
367
        }
368
        $this->forward('default', array(
369
            'idPage' => $this->actualPage->getId()
370
        ));
371
    }
372
373
    public function actionDefault($idPage)
374
    {