static_page   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 32
rs 10
c 1
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A codecraft() 0 2 1
A wdw() 0 2 1
A logout() 0 2 1
A accommodation() 0 6 1
A login() 0 2 1
A __construct() 0 2 1
A register() 0 2 1
1
<?php
2
3
class static_page extends Controller {
4
5
    public function __construct() {
6
        $this->load_library('http_lib');
7
    }
8
9
    public function login() {
10
        $this->http_lib->redirect( locale_base_url() . 'oidc/login/' );
0 ignored issues
show
Bug Best Practice introduced by
The property http_lib does not exist on static_page. Did you maybe forget to declare it?
Loading history...
11
    }
12
13
    public function logout() {
14
        $this->http_lib->redirect( locale_base_url() . 'oidc/logout/' );
0 ignored issues
show
Bug Best Practice introduced by
The property http_lib does not exist on static_page. Did you maybe forget to declare it?
Loading history...
15
    }
16
17
    public function register() {
18
        $this->http_lib->redirect( locale_base_url() . 'oidc/login/' );
0 ignored issues
show
Bug Best Practice introduced by
The property http_lib does not exist on static_page. Did you maybe forget to declare it?
Loading history...
19
    }
20
21
    public function wdw() {
22
        $this->http_lib->redirect( locale_base_url() . 'talks-and-workshops/web-development/' );
0 ignored issues
show
Bug Best Practice introduced by
The property http_lib does not exist on static_page. Did you maybe forget to declare it?
Loading history...
23
    }
24
25
    public function codecraft() {
26
        $this->load_view('contest/codecraft_scores');
27
    }
28
29
    public function accommodation() {
30
        $this->load_library('auth_lib');
31
        $this->auth_lib->force_authentication();
0 ignored issues
show
Bug Best Practice introduced by
The property auth_lib does not exist on static_page. Did you maybe forget to declare it?
Loading history...
32
33
        $this->load_view('accommodation', [
34
            'user' => $this->auth_lib->get_user_details()
35
        ]);
36
    }
37
}
38