Translate   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 31
rs 10
c 0
b 0
f 0
ccs 10
cts 10
cp 1
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getCurrentKey() 0 3 1
A getParentKey() 0 3 1
A getCreatedKey() 0 3 1
A getContentKey() 0 3 1
A getPrimaryKey() 0 3 1
1
<?php
2
3
namespace kalanis\kw_files_mapper\Support\Process;
4
5
6
/**
7
 * Class Translate
8
 * @package kalanis\kw_files_mapper\Support\Process
9
 * Translate keys which represents the column names
10
 * When it contains null then the column does not exists and cannot be used
11
 */
12
class Translate
13
{
14
    protected string $current = 'name';
15
    protected string $parent = 'parentId';
16
    protected string $primary = 'id';
17
    protected string $content = 'content';
18
    protected ?string $created = 'created';
19
20 90
    public function getCurrentKey(): string
21
    {
22 90
        return $this->current;
23
    }
24
25 64
    public function getParentKey(): string
26
    {
27 64
        return $this->parent;
28
    }
29
30 57
    public function getPrimaryKey(): string
31
    {
32 57
        return $this->primary;
33
    }
34
35 46
    public function getContentKey(): string
36
    {
37 46
        return $this->content;
38
    }
39
40 4
    public function getCreatedKey(): ?string
41
    {
42 4
        return $this->created;
43
    }
44
}
45