Utilities   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSecurityToken() 0 9 2
1
<?php
2
3
class Utilities {
4
    /**
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
5
     * Generate a security token.
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
6
     * */
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
7
    public static function getSecurityToken()
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
8
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
9
        // Ensure the session exists before querying it.
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
10
        if (!Session::request_contains_session_id()) {
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
11
            Session::start();
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
12
        }
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
13
14
        return SecurityToken::inst()->getSecurityID();
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
15
    }
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
16
}
17