src/Resources/public/js/flashes.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 1.5

Size

Lines of Code 17
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 3
c 1
b 1
f 0
dl 0
loc 17
rs 10
cc 0
nc 1
mnd 1
bc 3
fnc 2
bpm 1.5
cpm 1.5
noi 1

2 Functions

Rating   Name   Duplication   Size   Complexity  
A Admin.flashMessage.hide 0 9 2
A Admin.flashMessage.show 0 6 1
1
Admin.flashMessage = {
0 ignored issues
show
Bug introduced by
The variable Admin seems to be never declared. If this is a global, consider adding a /** global: Admin */ 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
    show: function(type, message) {
3
        var flash = $('#flash-' + type);
4
5
        flash.find('.flash-content').html(message);
6
        flash.show();
7
    },
8
    hide: function(type) {
9
        if(type) {
10
            $('#flash-' + type).hide();
11
            
12
            return;
13
        }
14
        
15
        $('.js-flash').hide();
16
    }
17
};
18
19
20