Completed
Push — master ( b01ef1...6c7077 )
by
unknown
02:58
created

js/payone/core/opcheckoutmod.js   A

Complexity

Total Complexity 6
Complexity/F 6

Size

Lines of Code 14
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
B Review.nextStep.wrap 0 12 5
1
if (Review) {
0 ignored issues
show
Best Practice introduced by
If you intend to check if the variable Review is declared in the current environment, consider using typeof Review === "undefined" instead. This is safe if the variable is not actually declared.
Loading history...
2
    Review.prototype.nextStep = Review.prototype.nextStep.wrap(function (superMethod, transport) {
3
        if (transport && payment && payment.currentMethod.indexOf("payone") !== -1) {
0 ignored issues
show
Best Practice introduced by
If you intend to check if the variable payment is declared in the current environment, consider using typeof payment === "undefined" instead. This is safe if the variable is not actually declared.
Loading history...
4
            var response = transport.responseJSON || transport.responseText.evalJSON(true) || {};
5
6
            if (response.redirect) {
7
                this.isSuccess = true;
8
                location.href = response.redirect;
9
                return;
10
            }
11
        }
12
        return superMethod(transport);
13
    });
14
}
15