Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 26 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import template from './sw-promotion-v2-settings-rule-selection.html.twig'; |
||
2 | |||
3 | const { Component } = Shopware; |
||
|
|||
4 | const { Criteria } = Shopware.Data; |
||
5 | |||
6 | Component.register('sw-promotion-v2-settings-rule-selection', { |
||
7 | template, |
||
8 | |||
9 | inject: [ |
||
10 | 'acl' |
||
11 | ], |
||
12 | |||
13 | props: { |
||
14 | discount: { |
||
15 | type: Object, |
||
16 | required: true |
||
17 | } |
||
18 | }, |
||
19 | |||
20 | computed: { |
||
21 | ruleCriteria() { |
||
22 | return (new Criteria()) |
||
23 | .addSorting(Criteria.sort('name', 'ASC', false)); |
||
24 | } |
||
25 | } |
||
26 | }); |
||
27 |
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.