Completed
Pull Request — master (#1)
by
unknown
08:32
created

StatementAwareTrait::setSQL()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
namespace Dazzle\PgSQL\Statement;
3
4
use Dazzle\PgSQL\Result\Tuple;
5
use Dazzle\PgSQL\Result\CommandResult;
6
7
trait StatementAwareTrait
8
{
9
    protected $sql;
10
    protected $params;
11
12
    public function getSQL()
13
    {
14
        return $this->sql;
15
    }
16
17
    public function getParams()
18
    {
19
        return $this->params?:[];
20
    }
21
22
    public function setSQL($sql)
23
    {
24
        $this->sql = $sql;
25
26
        return $this;
27
    }
28
29
    public function setParams(array $params = [])
30
    {
31
        $this->params = $params;
32
        
33
        return $this;
34
    }
35
}