StatementFieldEntity::orgName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Lagdo\DbAdmin\Driver\Entity;
4
5
class StatementFieldEntity
6
{
7
    /**
8
     * The field type
9
     *
10
     * @var string
11
     */
12
    protected $type = '';
13
14
    /**
15
     * If the field is binary
16
     *
17
     * @var bool
18
     */
19
    protected $isBinary = false;
20
21
    /**
22
     * The field name
23
     *
24
     * @var string
25
     */
26
    protected $name = '';
27
28
    /**
29
     * The field org name
30
     *
31
     * @var string
32
     */
33
    protected $orgName = '';
34
35
    /**
36
     * The field table name
37
     *
38
     * @var string
39
     */
40
    protected $table = '';
41
42
    /**
43
     * The field org table name
44
     *
45
     * @var string
46
     */
47
    protected $orgTable = '';
48
49
    /**
50
     * The constructor
51
     *
52
     * @param string $type
53
     * @param boolean $isBinary
54
     * @param string $name
55
     * @param string $orgName
56
     * @param string $table
57
     * @param string $orgTable
58
     */
59
    public function __construct(string $type, bool $isBinary,
60
        string $name, string $orgName, string $table = '', string $orgTable = '')
61
    {
62
        $this->type = $type;
63
        $this->isBinary = $isBinary;
64
        $this->name = $name;
65
        $this->orgName = $orgName;
66
        $this->table = $table;
67
        $this->orgTable = $orgTable;
68
    }
69
70
    public function type()
71
    {
72
        return $this->type;
73
    }
74
75
    public function isBinary()
76
    {
77
        return $this->isBinary;
78
    }
79
80
    public function name()
81
    {
82
        return $this->name;
83
    }
84
85
    public function orgName()
86
    {
87
        return $this->orgName;
88
    }
89
90
    public function table()
91
    {
92
        return $this->table;
93
    }
94
95
    public function orgTable()
96
    {
97
        return $this->orgTable;
98
    }
99
100
    public function tableName()
101
    {
102
        return $this->table ?? $this->orgTable;
103
    }
104
}
105