src/__mocks__/backend.js   A
last analyzed

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 22
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

4 Functions

Rating   Name   Duplication   Size   Complexity  
A Backend.init 0 1 1
A Backend.registerSecurityHandler 0 6 1
A Backend.constructor 0 4 1
A Backend.register 0 6 1
1
export default class Backend {
2
    constructor() {
3
        this.routes = [];
4
        this.security = [];
5
    }
6
7
    register(operationId, handler) {
8
        this.routes.push({
9
            operationId,
10
            handler,
11
        });
12
    }
13
14
    registerSecurityHandler(name, handler) {
15
        this.security.push({
16
            name,
17
            handler,
18
        });
19
    }
20
21
    init() {}
22
}
23