Completed
Push — master ( a97a29...ec6402 )
by Jonathan
09:06
created

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

Complexity

Total Complexity 4
Complexity/F 2

Size

Lines of Code 19
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
eloc 11
nc 1
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 4
mnd 1
bc 2
fnc 2
bpm 1
cpm 2
noi 1

2 Functions

Rating   Name   Duplication   Size   Complexity  
A autoloader.js ➔ lazyLoad 0 9 2
A autoloader.js ➔ 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...