Completed
Push — master ( aeb0c8...42f5d5 )
by Mathieu
25s queued 10s
created

server/src/Infrastructure/Customer/Repository/AddressRepository.ts   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 18
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

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