ImportDbUnit::setTmpTable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Maketok\DataMigration\Unit\Type;
4
5
use Maketok\DataMigration\Unit\ImportDbUnitInterface;
6
7
abstract class ImportDbUnit extends ImportFileUnit implements ImportDbUnitInterface
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $tableName;
13
    /**
14
     * @var string
15
     */
16
    protected $tmpTable;
17
    /**
18
     * @var string|string[]
19
     */
20
    protected $primaryKey;
21
22
    /**
23
     * {@inheritdoc}
24
     */
25 15
    public function getTmpTable()
26
    {
27 15
        return $this->tmpTable;
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33 12
    public function setTmpTable($tmpTable)
34
    {
35 12
        $this->tmpTable = $tmpTable;
36 12
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41 11
    public function setTable($tableName)
42
    {
43 11
        $this->tableName = $tableName;
44 11
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49 10
    public function getTable()
50
    {
51 10
        return $this->tableName;
52
    }
53
54
    /**
55
     * {@inheritdoc}
56
     */
57 2
    public function getPk()
58
    {
59 2
        return $this->primaryKey;
60
    }
61
62
    /**
63
     * {@inheritdoc}
64
     */
65 3
    public function setPk($definition)
66
    {
67 3
        $this->primaryKey = $definition;
68 3
    }
69
}
70