jaxon-core/tests/src/js/nss.js   A
last analyzed

Complexity

Total Complexity 12
Complexity/F 1

Size

Lines of Code 40
Function Count 12

Duplication

Duplicated Lines 40
Ratio 100 %

Importance

Changes 0
Metric Value
eloc 26
c 0
b 0
f 0
dl 40
loc 40
rs 10
wmc 12
mnd 0
bc 0
fnc 12
bpm 0
cpm 1
noi 13

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1 View Code Duplication
Jaxon = {
0 ignored issues
show
Bug introduced by
The variable Jaxon 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.Jaxon.
Loading history...
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2
  Tests: {
3
    Ns: {
4
      Ajax: {
5
        ClassA: {
6
          methodAa: function() { return jaxon.request({ type: 'class', name: 'Jaxon.Tests.Ns.Ajax.ClassA', method: 'methodAa' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
7
          methodAb: function() { return jaxon.request({ type: 'class', name: 'Jaxon.Tests.Ns.Ajax.ClassA', method: 'methodAb' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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
        },
9
        ClassB: {
10
          methodBa: function() { return jaxon.request({ type: 'class', name: 'Jaxon.Tests.Ns.Ajax.ClassB', method: 'methodBa' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
11
          methodBb: function() { return jaxon.request({ type: 'class', name: 'Jaxon.Tests.Ns.Ajax.ClassB', method: 'methodBb' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
12
        },
13
        ClassC: {
14
          methodCa: function() { return jaxon.request({ type: 'class', name: 'Jaxon.Tests.Ns.Ajax.ClassC', method: 'methodCa' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
15
          methodCb: function() { return jaxon.request({ type: 'class', name: 'Jaxon.Tests.Ns.Ajax.ClassC', method: 'methodCb' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
16
        },
17
      },
18
    },
19
  },
20
  NsTests: {
21
    DirA: {
22
      ClassA: {
23
        methodAa: function() { return jaxon.request({ type: 'class', name: 'Jaxon.NsTests.DirA.ClassA', method: 'methodAa' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
24
        methodAb: function() { return jaxon.request({ type: 'class', name: 'Jaxon.NsTests.DirA.ClassA', method: 'methodAb' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
25
      },
26
    },
27
    DirB: {
28
      ClassB: {
29
        methodBa: function() { return jaxon.request({ type: 'class', name: 'Jaxon.NsTests.DirB.ClassB', method: 'methodBa' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
30
        methodBb: function() { return jaxon.request({ type: 'class', name: 'Jaxon.NsTests.DirB.ClassB', method: 'methodBb' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
31
      },
32
    },
33
    DirC: {
34
      ClassC: {
35
        methodCa: function() { return jaxon.request({ type: 'class', name: 'Jaxon.NsTests.DirC.ClassC', method: 'methodCa' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
36
        methodCb: function() { return jaxon.request({ type: 'class', name: 'Jaxon.NsTests.DirC.ClassC', method: 'methodCb' }, { parameters: arguments }); },
0 ignored issues
show
Bug introduced by
The variable jaxon seems to be never declared. If this is a global, consider adding a /** global: jaxon */ 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...
37
      },
38
    },
39
  },
40
};
41