Code Duplication    Length = 9-10 lines in 2 locations

src/Controller/DevelopersController.php 1 location

@@ 77-85 (lines=9) @@
74
                $this->Flash->default('You have been logged in successfully',
75
                        array('params' => array('class' => $flash_class)));
76
            }
77
        } else {
78
            $flash_class = 'alert alert-error';
79
            $this->Flash->default('We were not able to authenticate you.'
80
                    . ' Please try again later',
81
                    array('params' => array('class' => $flash_class)));
82
83
            $this->redirect('/');
84
            return;
85
        }
86
87
        $last_page = $this->request->session()->read('last_page');
88
        if (empty($last_page)) {

src/Controller/GithubController.php 1 location

@@ 436-445 (lines=10) @@
433
     */
434
    public function sync_issue_status()
435
    {
436
        if (!defined('CRON_DISPATCHER')) {
437
            $flash_class = 'alert alert-error';
438
            $this->Flash->default(
439
                'Unauthorised action! This action is not available on Web interface',
440
                array('params' => array('class' => $flash_class))
441
            );
442
443
            $this->redirect('/');
444
            return;
445
        }
446
447
        $this->autoRender = false;
448
        $reportsTable = TableRegistry::get('Reports');