Passed
Push — master ( 34c669...9a4c09 )
by Christian
13:27 queued 13s
created

src/Administration/Resources/app/administration/src/module/sw-extension/mixin/extension-error.mixin.js   A

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 20
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 3
mnd 0
bc 0
fnc 3
bpm 0
cpm 1
noi 3
1
2
export default {
3
    mixins: [Shopware.Mixin.getByName('notification')],
0 ignored issues
show
Bug introduced by
The variable Shopware seems to be never declared. If this is a global, consider adding a /** global: Shopware */ 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...
4
5
    methods: {
6
        showSaasErrors(errorResponse) {
7
            Shopware.Service('saasErrorHandler')
0 ignored issues
show
Bug introduced by
The variable Shopware seems to be never declared. If this is a global, consider adding a /** global: Shopware */ 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...
8
                .handleErrorResponse(errorResponse, this)
9
                .forEach((notification) => {
10
                    this.createNotificationError(notification);
11
                });
12
        },
13
14
        showSingleSaasError(error) {
15
            this.createNotificationError(
16
                Shopware.Service('saasErrorHandler')
0 ignored issues
show
Bug introduced by
The variable Shopware seems to be never declared. If this is a global, consider adding a /** global: Shopware */ 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...
17
                    .handleError(error, this)
18
            );
19
        }
20
    }
21
};
22