Code Duplication    Length = 13-13 lines in 2 locations

app/modules/Application/Mvc/Controller.php 1 location

@@ 21-33 (lines=13) @@
18
class Controller extends \Phalcon\Mvc\Controller
19
{
20
21
    public function redirect($url, $code = 302)
22
    {
23
        switch ($code) {
24
            case 301:
25
                header('HTTP/1.1 301 Moved Permanently');
26
                break;
27
            case 302:
28
                header('HTTP/1.1 302 Moved Temporarily');
29
                break;
30
        }
31
        header('Location: ' . $url);
32
        $this->response->send();
33
    }
34
35
    public function returnJSON($response)
36
    {

app/plugins/Acl.php 1 location

@@ 87-99 (lines=13) @@
84
        exit;
85
    }
86
87
    private function redirect($url, $code = 302)
88
    {
89
        switch ($code) {
90
            case 301 :
91
                header('HTTP/1.1 301 Moved Permanently');
92
                break;
93
            case 302 :
94
                header('HTTP/1.1 302 Moved Temporarily');
95
                break;
96
        }
97
        header('Location: ' . $url);
98
        exit;
99
    }
100
101
}