Total Complexity | 6 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | class MappingLogRepository implements MappingLogRepositoryContract |
||
9 | { |
||
10 | /** |
||
11 | * @inheritdoc |
||
12 | */ |
||
13 | 15 | public function add(string $mapping) |
|
14 | { |
||
15 | 15 | $entity = new MappingLog(); |
|
16 | |||
17 | 15 | $entity->mapping = $mapping; |
|
18 | 15 | $entity->saveOrFail(); |
|
19 | 15 | } |
|
20 | |||
21 | /** |
||
22 | * @inheritdoc |
||
23 | */ |
||
24 | 3 | public function find(int $id) : ?MappingLog |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @inheritdoc |
||
31 | */ |
||
32 | 3 | public function delete(int $id) |
|
36 | } |
||
37 | 3 | } |
|
38 | |||
39 | /** |
||
40 | * @inheritdoc |
||
41 | */ |
||
42 | 15 | public function all(): array |
|
43 | { |
||
44 | 15 | return MappingLog::all(['id', 'mapping'])->toArray(); |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | 3 | public function reset() |
|
53 | 3 | } |
|
54 | } |
||
55 |