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

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