Passed
Pull Request — master (#188)
by Mathieu
01:57
created

server/src/Infrastructure/Adapter/QueryBusAdapter.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 QueryBusAdapter.execute 0 3 1
1
import {Injectable} from '@nestjs/common';
2
import {QueryBus} from '@nestjs/cqrs';
3
import {IQueryBus} from 'src/Application/IQueryBus';
4
import {IQuery} from 'src/Application/IQuery';
5
6
@Injectable()
7
export class QueryBusAdapter implements IQueryBus {
8
  constructor(private readonly queryBus: QueryBus) {}
9
10
  public execute(query: IQuery): Promise<any> {
11
    return this.queryBus.execute(query);
12
  }
13
}
14