assets/yii2-floor12-files-block.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 11
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 7
dl 0
loc 11
rs 10
c 0
b 0
f 0
mnd 0
bc 0
fnc 2
bpm 0
cpm 1
noi 4
1
function filesDownloadAll(title, event, yiiDownloadAllLink) {
2
    obj = $(event.target).parents('div.files-block');
0 ignored issues
show
Bug introduced by
The variable obj 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.obj.
Loading history...
3
    hashes = "";
0 ignored issues
show
Bug introduced by
The variable hashes 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.hashes.
Loading history...
4
    $.each(obj.find('.f12-file-object'), function (key, val) {
5
        hashes += "&hash[]=" + $(val).data('hash');
0 ignored issues
show
Bug introduced by
The variable hashes 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.hashes.
Loading history...
6
    });
7
    console.log(hashes);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
8
9
    window.open(yiiDownloadAllLink + "?title=" + title + hashes);
10
11
}