Passed
Pull Request — master (#188)
by Mathieu
02:03
created

server/src/Infrastructure/Adapter/CommandBusAdapter.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
eloc 11
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 1
mnd 0
bc 0
fnc 1
bpm 0
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A CommandBusAdapter.execute 0 3 1
1
import {CommandBus} from '@nestjs/cqrs';
2
import {Injectable} from '@nestjs/common';
3
import {ICommandBus} from 'src/Application/ICommandBus';
4
import {ICommand} from 'src/Application/ICommand';
5
6
@Injectable()
7
export class CommandBusAdapter implements ICommandBus {
8
  constructor(private readonly commandBus: CommandBus) {}
9
10
  public execute(command: ICommand): Promise<any> {
11
    return this.commandBus.execute(command);
12
  }
13
}
14