Passed
Push — 6.4 ( 232ba6...48563d )
by Christian
18:34 queued 27s
created

UserActivityService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A updateLastUserActivity 0 6 2
1
/**
2
 * @private
3
 */
4
export default class UserActivityService {
5
    updateLastUserActivity(date?: Date): void {
6
        if (date === undefined) {
7
            date = new Date();
8
        }
9
10
        Shopware.Context.app.lastActivity = Math.round(+date / 1000);
11
    }
12
}
13