Completed
Push — master ( 1360ae...ad0215 )
by Mathieu
17s queued 12s
created

server/src/Infrastructure/Adapter/EventBusAdapter.ts   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 14
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A EventBusAdapter.publish 0 3 1
1
import {Injectable} from '@nestjs/common';
2
import {EventBus} from '@nestjs/cqrs';
3
import {IEventBus} from 'src/Application/IEventBus';
4
import {IEvent} from 'src/Application/IEvent';
5
6
@Injectable()
7
export class EventBusAdapter implements IEventBus {
8
  constructor(private readonly eventBus: EventBus) {}
9
10
  public publish(event: IEvent): void {
11
    this.eventBus.publish(event);
12
  }
13
}
14