Model::setField()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Noitran\RQL\Parsers;
6
7
/**
8
 * Class Model.
9
 */
10
class Model
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $relation;
16
17
    /**
18
     * @var string
19
     */
20
    protected $field;
21
22
    /**
23
     * @var string
24
     */
25
    protected $expression;
26
27
    /**
28
     * @var string
29
     */
30
    protected $dataType;
31
32
    /**
33
     * @var mixed
34
     */
35
    protected $value;
36
37
    /**
38
     * @return string
39
     */
40
    public function getRelation(): ?string
41
    {
42
        return $this->relation;
43
    }
44
45
    /**
46
     * @param string $relation
47
     *
48
     * @return Model
49
     */
50
    public function setRelation(?string $relation): self
51
    {
52
        $this->relation = $relation;
53
54
        return $this;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getField(): string
61
    {
62
        return $this->field;
63
    }
64
65
    /**
66
     * @param string $field
67
     *
68
     * @return Model
69
     */
70
    public function setField(string $field): self
71
    {
72
        $this->field = $field;
73
74
        return $this;
75
    }
76
77
    /**
78
     * @return string
79
     */
80
    public function getExpression(): string
81
    {
82
        return $this->expression;
83
    }
84
85
    /**
86
     * @param string $expression
87
     *
88
     * @return Model
89
     */
90
    public function setExpression(string $expression): self
91
    {
92
        $this->expression = $expression;
93
94
        return $this;
95
    }
96
97
    /**
98
     * @return string
99
     */
100
    public function getDataType(): string
101
    {
102
        return $this->dataType;
103
    }
104
105
    /**
106
     * @param string $dataType
107
     *
108
     * @return Model
109
     */
110
    public function setDataType(string $dataType): self
111
    {
112
        $this->dataType = $dataType;
113
114
        return $this;
115
    }
116
117
    /**
118
     * @return mixed
119
     */
120
    public function getValue()
121
    {
122
        return $this->value;
123
    }
124
125
    /**
126
     * @param $value
127
     *
128
     * @return Model
129
     */
130
    public function setValue($value): self
131
    {
132
        $this->value = $value;
133
134
        return $this;
135
    }
136
}
137