Total Complexity | 5 |
Complexity/F | 1 |
Lines of Code | 24 |
Function Count | 5 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | Shopware.Mixin.register('contextNodeMixin', { |
||
|
|||
2 | provide() { |
||
3 | return { |
||
4 | registerAtParent: this.registerChild, |
||
5 | removeFromParent: this.removeChild |
||
6 | }; |
||
7 | }, |
||
8 | |||
9 | data() { |
||
10 | return { |
||
11 | childNodes: [] |
||
12 | }; |
||
13 | }, |
||
14 | |||
15 | methods: { |
||
16 | registerChild(child) { |
||
17 | this.childNodes.push(child); |
||
18 | return this; |
||
19 | }, |
||
20 | removeChild(child) { |
||
21 | this.childNodes = this.childNodes.filter((c) => c !== child); |
||
22 | } |
||
23 | } |
||
24 | }); |
||
25 |
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.