client/controllers/reducers/count.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 3

Size

Lines of Code 12
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 3
eloc 8
nc 1
mnd 1
bc 1
fnc 1
dl 0
loc 12
bpm 1
cpm 3
noi 0
c 1
b 0
f 0
rs 10

1 Function

Rating   Name   Duplication   Size   Complexity  
A count.js ➔ reducer 0 8 3
1
import { ADD } from 'controllers/actions/count';
2
3
const initialState = 0;
4
5
export default function reducer(state = initialState, action) {
6
  switch (action.type) {
7
    case ADD:
8
      return state + 1;
9
    default:
10
      return state;
11
  }
12
}
13