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

UserActivityService.updateLastUserActivity   A

Complexity

Conditions 2

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
dl 0
loc 6
rs 10
c 0
b 0
f 0
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