Code Duplication    Length = 8-10 lines in 7 locations

app/Http/Controllers/Profile/HistoryController.php 3 locations

@@ 46-53 (lines=8) @@
43
    /**
44
     * Display last password reset.
45
     */
46
    public function passwordReset()
47
    {
48
        $user = $this->getUser();
49
        $this->response->html($this->helper->layout->profile('profile/history/password_reset', [
50
            'tokens' => $this->passwordResetModel->getAll($user['id']),
51
            'user'   => $user,
52
        ], 'profile/history/_partials/subnav'));
53
    }
54
55
    /**
56
     * Display last connections.
@@ 58-65 (lines=8) @@
55
    /**
56
     * Display last connections.
57
     */
58
    public function lastLogin()
59
    {
60
        $user = $this->getUser();
61
        $this->response->html($this->helper->layout->profile('profile/history/last', [
62
            'last_logins' => $this->lastLoginModel->getAll($user['id']),
63
            'user'        => $user,
64
        ], 'profile/history/_partials/subnav'));
65
    }
66
67
    /**
68
     * Display user sessions.
@@ 70-77 (lines=8) @@
67
    /**
68
     * Display user sessions.
69
     */
70
    public function sessions()
71
    {
72
        $user = $this->getUser();
73
        $this->response->html($this->helper->layout->profile('profile/history/sessions', [
74
            'sessions' => $this->rememberMeSessionModel->getAll($user['id']),
75
            'user'     => $user,
76
        ], 'profile/history/_partials/subnav'));
77
    }
78
79
    /**
80
     * Remove a "RememberMe" token.

app/Http/Controllers/Profile/ProfileController.php 1 location

@@ 133-140 (lines=8) @@
130
    /**
131
     * Display external accounts.
132
     */
133
    public function external()
134
    {
135
        $user = $this->getUser();
136
        $this->response->html($this->helper->layout->profile('profile/external', [
137
            'last_logins' => $this->lastLoginModel->getAll($user['id']),
138
            'user'        => $user,
139
        ]));
140
    }
141
142
    /**
143
     * Public access management.

app/Http/Controllers/Dashboard/NotificationController.php 1 location

@@ 24-32 (lines=9) @@
21
    /**
22
     * My notifications.
23
     */
24
    public function index()
25
    {
26
        $user = $this->getUser();
27
28
        $this->response->html($this->helper->layout->app('dashboard/notifications', [
29
            'title'         => t('My notifications'),
30
            'notifications' => $this->userUnreadNotificationModel->getAll($user['id']),
31
        ]));
32
    }
33
34
    /**
35
     * Mark all notifications as read.

app/Http/Controllers/Dashboard/DashboardController.php 1 location

@@ 101-109 (lines=9) @@
98
    /**
99
     * My calendar.
100
     */
101
    public function calendar()
102
    {
103
        $user = $this->getUser();
104
105
        $this->response->html($this->helper->layout->dashboard('dashboard/calendar', [
106
            'title' => t('My calendar'),
107
            'user'  => $user,
108
        ]));
109
    }
110
111
    /**
112
     * My slider.

app/Http/Controllers/Project/ProjectRoleController.php 1 location

@@ 25-34 (lines=10) @@
22
    /**
23
     * Show roles and permissions.
24
     */
25
    public function show()
26
    {
27
        $project = $this->getProject();
28
29
        $this->response->html($this->helper->layout->project('project/role/show', [
30
            'project' => $project,
31
            'roles'   => $this->projectRoleModel->getAllWithRestrictions($project['id']),
32
            'title'   => t('Custom Project Roles'),
33
        ]));
34
    }
35
36
    /**
37
     * Show form to create new role.