Passed
Pull Request — master (#436)
by
unknown
02:43
created

src/Infrastructure/Notification/Repository/NotificationRepository.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 NotificationRepository.save 0 3 1
1
import { Injectable } from '@nestjs/common';
2
import { InjectRepository } from '@nestjs/typeorm';
3
import { Repository } from 'typeorm';
4
import { INotificationRepository } from 'src/Domain/Notification/Repository/INotificationRepository';
5
import { Notification } from 'src/Domain/Notification/Notification.entity';
6
7
@Injectable()
8
export class NotificationRepository implements INotificationRepository {
9
  constructor(
10
    @InjectRepository(Notification)
11
    private readonly repository: Repository<Notification>
12
  ) {}
13
14
  public save(notification: Notification): Promise<Notification> {
15
    return this.repository.save(notification);
16
  }
17
}
18