Code Duplication    Length = 5-5 lines in 4 locations

src/Controller/GithubController.php 4 locations

@@ 100-104 (lines=5) @@
97
98
            $this->redirect(array('controller' => 'reports', 'action' => 'view',
99
                $reportId, ));
100
        } else {
101
            $flash_class = 'alert alert-error';
102
            $this->Flash->default($this->_getErrors($issueDetails, $status),
103
                array('params' => array('class' => $flash_class)));
104
        }
105
    }
106
107
    /**
@@ 162-166 (lines=5) @@
159
            }
160
161
            $reportsTable->save($report);
162
        } else {
163
            $flash_class = 'alert alert-error';
164
            $this->Flash->default($this->_getErrors($commentDetails, $status),
165
                    array('params' => array('class' => $flash_class)));
166
        }
167
168
        $this->redirect(array('controller' => 'reports', 'action' => 'view',
169
                        $reportId, ));
@@ 217-221 (lines=5) @@
214
            // Update report status
215
            $report->status = 'new';
216
            $reportsTable->save($report);
217
        } else {
218
            $flash_class = 'alert alert-error';
219
            $this->Flash->default($this->_getErrors($commentDetails, $status),
220
                    array('params' => array('class' => $flash_class)));
221
        }
222
223
        $this->redirect(array('controller' => 'reports', 'action' => 'view',
224
                        $reportId, ));
@@ 332-336 (lines=5) @@
329
                TableRegistry::get('Reports')->save($report);
330
            }
331
332
            if ($msg !== '') {
333
                $flash_class = 'alert alert-success';
334
                $this->Flash->default($msg,
335
                    array('params' => array('class' => $flash_class)));
336
            }
337
338
            return true;
339
        } elseif ($response === 403) {