static_page::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 1
b 0
f 0
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