Passed
Push — master ( 923e12...5d294b )
by Jonathan
26:47
created

resources/assets/js/user/autoloader.js   A

Complexity

Total Complexity 3
Complexity/F 1.5

Size

Lines of Code 19
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 11
c 0
b 0
f 0
dl 0
loc 19
rs 10
wmc 3
mnd 1
bc 1
fnc 2
bpm 0.5
cpm 1.5
noi 1

2 Functions

Rating   Name   Duplication   Size   Complexity  
A Autoloader.lazyLoad 0 9 2
A Autoloader.constructor 0 3 1
1
import { UserAccount } from './user-account'
2
3
class Autoloader {
4
    constructor() {
5
        this.lazyLoad()
6
    }
7
8
    lazyLoad() {
9
        let page = $('meta[name="page"]').attr('content')
10
11
        switch (page) {
12
            case 'user-account':
13
                new UserAccount()
14
                break;
15
        }
16
    }
17
}
18
19
new Autoloader()
0 ignored issues
show
Unused Code Best Practice introduced by
The object created with new Autoloader() is not used but discarded. Consider invoking another function instead of a constructor if you are doing this purely for side effects.
Loading history...