Passed
Pull Request — master (#75)
by Mathieu
01:46
created

server/src/Domain/FairCalendar/Specification/DoesEventBelongToUser.ts   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 9
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
mnd 0
bc 0
fnc 1
dl 0
loc 9
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A DoesEventBelongToUser.isSatisfiedBy 0 2 1
1
import {Event} from '../Event.entity';
2
import {User} from 'src/Domain/User/User.entity';
3
4
export class DoesEventBelongToUser {
5
  public isSatisfiedBy(event: Event, user: User): boolean {
6
    return event.getUser().getId() === user.getId();
7
  }
8
}
9