Passed
Pull Request — master (#70)
by Mathieu
01:43
created

server/src/Infrastructure/Billing/Repository/QuoteItemRepository.ts   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 16
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A QuoteItemRepository.save 0 3 1
1
import {InjectRepository} from '@nestjs/typeorm';
2
import {Repository} from 'typeorm';
3
import {QuoteItem} from 'src/Domain/Billing/QuoteItem.entity';
4
import {IQuoteItemRepository} from 'src/Domain/Billing/Repository/IQuoteItemRepository';
5
6
export class QuoteItemRepository implements IQuoteItemRepository {
7
  constructor(
8
    @InjectRepository(QuoteItem)
9
    private readonly repository: Repository<QuoteItem>
10
  ) {}
11
12
  public save(quoteItem: QuoteItem): Promise<QuoteItem> {
13
    return this.repository.save(quoteItem);
14
  }
15
}
16