Completed
Push — master ( 4a04e3...83688f )
by Changwan
03:47
created

RawExpression::getBindings()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Wandu\Database\Query\Expression;
3
4
use Wandu\Database\Contracts\ExpressionInterface;
5
6
class RawExpression implements ExpressionInterface 
7
{
8
    /** @var string */
9
    protected $expression;
10
    
11
    /** @var array */
12
    protected $bindings;
13
    
14
    /**
15
     * @param string $expression
16
     * @param array $bindings
17
     */
18 3
    public function __construct($expression, array $bindings = [])
19
    {
20 3
        $this->expression = $expression;
21 3
        $this->bindings = $bindings;
22 3
    }
23
24
    /**
25
     * @return string
26
     */
27 3
    public function toSql()
28
    {
29 3
        return $this->expression;
30
    }
31
32
    /**
33
     * @return array
34
     */
35 1
    public function getBindings()
36
    {
37 1
        return $this->bindings;
38
    }
39
}
40