Order::getTableName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace kalanis\kw_mapper\Storage\Shared\QueryBuilder;
4
5
6
class Order
7
{
8
    protected string $tableName = '';
9
    /** @var string|int */
10
    protected $columnName = '';
11
    protected string $direction = '';
12
13
    /**
14
     * @param string $tableName
15
     * @param string|int $columnName
16
     * @param string $direction
17
     * @return $this
18
     */
19 23
    public function setData(string $tableName, $columnName, string $direction = ''): self
20
    {
21 23
        $this->tableName = $tableName;
22 23
        $this->columnName = $columnName;
23 23
        $this->direction = $direction;
24 23
        return $this;
25
    }
26
27 14
    public function getTableName(): string
28
    {
29 14
        return $this->tableName;
30
    }
31
32
    /**
33
     * @return string|int
34
     */
35 23
    public function getColumnName()
36
    {
37 23
        return $this->columnName;
38
    }
39
40 23
    public function getDirection(): string
41
    {
42 23
        return $this->direction;
43
    }
44
}
45