Passed
Push — master ( 2ac20a...d01831 )
by Javier
03:34 queued 01:31
created

event_poll_repository.js ➔ all   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A event_poll_repository.js ➔ ... ➔ ??? 0 1 1
1
export default class EventPollRepository {
2
  constructor () {
3
    this.storage = {}
4
  }
5
6
  findById (id) {
7
    return this.storage[id]
8
  }
9
10
  save (eventPoll) {
11
    this.storage[eventPoll.id] = eventPoll
12
  }
13
14
  all () {
15
    return Object.keys(this.storage).map(eventPollId => this.storage[eventPollId])
16
  }
17
}
18