Passed
Branch v3 (3b6795)
by Andrew
07:36
created

src/web/assets/src/js/Shortlinks.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 20
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 13
c 0
b 0
f 0
dl 0
loc 20
rs 10
mnd 0
bc 0
fnc 4
bpm 0
cpm 1
noi 22
1
import Vue from 'vue';
2
import VueEvents from 'vue-events';
3
import ShortlinksTable from '@/vue/ShortlinksTable.vue';
4
5
Vue.use(VueEvents);
6
// Create our vue instance
7
new Vue({
0 ignored issues
show
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Unused Code Best Practice introduced by
The object created with new Vue({IdentifierNode(...one)),false,false))))}) is not used but discarded. Consider invoking another function instead of a constructor if you are doing this purely for side effects.
Loading history...
8
  el: "#cp-nav-content",
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 4 spaces, but found 2.
Loading history...
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
9
  components: {
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 4 spaces, but found 2.
Loading history...
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
10
    'shortlinks-table': ShortlinksTable,
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 8 spaces, found 4
Loading history...
11
  },
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 4 spaces, but found 2.
Loading history...
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
12
  mounted() {
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 4 spaces, but found 2.
Loading history...
Coding Style introduced by
Line indented incorrectly; expected at least 4 spaces, found 2
Loading history...
13
    this.$events.$on('refresh-table', eventData => this.onTableRefresh(eventData));
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 8 spaces, found 4
Loading history...
14
  },
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 4 spaces, but found 2.
Loading history...
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
15
  methods: {
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 4 spaces, but found 2.
Loading history...
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
16
    onTableRefresh(vuetable) {
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 8 spaces, found 4
Loading history...
17
      Vue.nextTick(() => vuetable.refresh());
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 12 spaces, found 6
Loading history...
18
    }
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 8 spaces, found 4
Loading history...
19
  },
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 4 spaces, but found 2.
Loading history...
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
20
});
0 ignored issues
show
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
21