Skip to content

Commit eb87858

Browse files
committed
Formatting
1 parent ee82c32 commit eb87858

15 files changed

+833
-820
lines changed

models/DefaultContextProvider.cfc

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
component {
22

3-
property name="javaInetAddress" inject="java:java.net.InetAddress";
4-
property name="environment" inject="coldbox:setting:environment";
5-
property name="javaSystem" inject="java:java.lang.System";
3+
property name="javaInetAddress" inject="java:java.net.InetAddress";
4+
property name="environment" inject="coldbox:setting:environment";
5+
property name="javaSystem" inject="java:java.lang.System";
66

7-
public struct function getContext() {
8-
return {
9-
"appName": getApplicationName(),
10-
"environment": variables.environment,
11-
"userId": "",
12-
"sessionId": getSessionId(),
13-
"remoteAddress": CGI.REMOTE_ADDR,
14-
"hostname": resolveHostname()
15-
};
16-
}
7+
public struct function getContext() {
8+
return {
9+
"appName" : getApplicationName(),
10+
"environment" : variables.environment,
11+
"userId" : "",
12+
"sessionId" : getSessionId(),
13+
"remoteAddress" : CGI.REMOTE_ADDR,
14+
"hostname" : resolveHostname()
15+
};
16+
}
1717

18-
private string function getApplicationName() {
19-
try {
20-
return getApplicationSettings().name;
21-
} catch ( any e ) {
22-
return "";
23-
}
24-
}
18+
private string function getApplicationName() {
19+
try {
20+
return getApplicationSettings().name;
21+
} catch ( any e ) {
22+
return "";
23+
}
24+
}
2525

26-
private string function getSessionId() {
27-
try {
28-
return session.sessionid;
29-
} catch ( any e ) {
30-
return "";
31-
}
32-
}
26+
private string function getSessionId() {
27+
try {
28+
return session.sessionid;
29+
} catch ( any e ) {
30+
return "";
31+
}
32+
}
3333

34-
private string function resolveHostname() {
35-
var hostname = javaSystem.getProperty( "hostname" );
36-
if ( isNull( hostname ) ) {
37-
try {
38-
hostname = javaInetAddress.getLocalHost().getHostName();
39-
} catch ( UnknownHostException e ) {
40-
hostname = "undefined";
41-
}
42-
}
43-
return hostname;
44-
}
34+
private string function resolveHostname() {
35+
var hostname = javaSystem.getProperty( "hostname" );
36+
if ( isNull( hostname ) ) {
37+
try {
38+
hostname = javaInetAddress.getLocalHost().getHostName();
39+
} catch ( UnknownHostException e ) {
40+
hostname = "undefined";
41+
}
42+
}
43+
return hostname;
44+
}
4545

4646
}

0 commit comments

Comments
 (0)