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

src/Administration/Resources/app/administration/src/app/service/user-activity.service.ts   A

Complexity

Total Complexity 4
Complexity/F 2

Size

Lines of Code 13
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 4
mnd 2
bc 2
fnc 2
bpm 1
cpm 2
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A UserActivityService.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