resources/js/dashboard/store/index.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 25
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 17
nc 1
dl 0
loc 25
c 0
b 0
f 0
cc 0
rs 10
wmc 1
mnd 0
bc 1
fnc 1
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A index.js ➔ createStore 0 17 1
1
import Vue from 'vue'
2
import Vuex from 'vuex'
3
4
import { createActions } from './actions'
5
import mutations from './mutations'
6
7
Vue.use(Vuex)
8
9
export function createStore(route) {
10
  const actions = createActions(route)
11
12
  return new Vuex.Store({
13
    state: {
14
      counters: {
15
        newPostsCount: 0,
16
        pendingPostsCount: 0,
17
        publishedPostsCount: 0,
18
        activeUsersCount: 0,
19
        formSubmissionsCount: 0
20
      }
21
    },
22
    actions,
23
    mutations
24
  })
25
}
26