Code Duplication    Length = 9-9 lines in 2 locations

src/Comment/LoginController.php 1 location

@@ 47-55 (lines=9) @@
44
     */
45
    public function checkIsLogin()
46
    {
47
        if (!$this->di->get("session")->has("user")) {
48
            $views = [
49
                ["comment/user/fail/fail", [], "main"]
50
            ];
51
            $this->di->get("pageRenderComment")->renderPage([
52
                "views" => $views,
53
                "title" => "Not logged in"
54
            ]);
55
        }
56
    }
57
58

src/Comment/AdminController.php 1 location

@@ 41-49 (lines=9) @@
38
        $user = new User($this->di->get("db"));
39
        $user = $user->getUser($this->di->get("session")->get("user"));
40
41
        if ($user->authority != "admin") {
42
            $views = [
43
                ["comment/admin/fail", [], "main"]
44
            ];
45
            $this->di->get("pageRenderComment")->renderPage([
46
                "views" => $views,
47
                "title" => "Not authorized"
48
            ]);
49
        }
50
    }
51
52