templates/pgwjs/alert.js   A
last analyzed

Complexity

Total Complexity 5
Complexity/F 5

Size

Lines of Code 22
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 15
c 0
b 0
f 0
dl 0
loc 22
rs 10
wmc 5
mnd 4
bc 4
fnc 1
bpm 4
cpm 5
noi 3
1
jaxon.dialogs.pgwjs = {
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
2
    defaults: {maxWidth: 400},
3
    options: {},
4
    show: function(args) {
5
        // Set user and default options into data only when they are missing
6
        for(key in jaxon.dialogs.pgwjs.options)
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Bug introduced by
The variable key seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.key.
Loading history...
7
        {
8
            if(!(key in args.data))
9
            {
10
                args.data[key] = jaxon.dialogs.pgwjs.options[key];
11
            }
12
        }
13
        for(key in jaxon.dialogs.pgwjs.defaults)
14
        {
15
            if(!(key in args.data))
16
            {
17
                args.data[key] = jaxon.dialogs.pgwjs.defaults[key];
18
            }
19
        }
20
        $.pgwModal(args.data);
21
    }
22
};
23