GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ProfileController::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
class ProfileController extends Controller
4
{
5
    /**
6
     * Construct this object by extending the basic Controller class
7
     */
8
    public function __construct()
9
    {
10
        parent::__construct();
11
    }
12
13
    /**
14
     * This method controls what happens when you move to /overview/index in your app.
15
     * Shows a list of all users.
16
     */
17
    public function index()
18
    {
19
        $this->View->render('profile/index', array(
20
            'users' => UserModel::getPublicProfilesOfAllUsers())
21
        );
22
    }
23
24
    /**
25
     * This method controls what happens when you move to /overview/showProfile in your app.
26
     * Shows the (public) details of the selected user.
27
     * @param $user_id int id the the user
28
     */
29
    public function showProfile($user_id)
30
    {
31
        if (isset($user_id)) {
32
            $this->View->render('profile/showProfile', array(
33
                'user' => UserModel::getPublicProfileOfUser($user_id))
34
            );
35
        } else {
36
            Redirect::home();
37
        }
38
    }
39
}
40