RawQuery   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 34
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A toSql() 0 4 1
A getBindings() 0 4 1
1
<?php
2
namespace Wandu\Database\Query;
3
4
use Wandu\Database\Contracts\QueryInterface;
5
6
class RawQuery implements QueryInterface
7
{
8
    /** @var string */
9
    protected $query;
10
11
    /** @var array */
12
    protected $bindings;
13
14
    /**
15
     * @param string $query
16
     * @param array $bindings
17
     */
18
    public function __construct($query, array $bindings = [])
19
    {
20
        $this->query = $query;
21
        $this->bindings = $bindings;
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    public function toSql()
28
    {
29
        return $this->query;
30
    }
31
32
    /**
33
     * @return array
34
     */
35
    public function getBindings()
36
    {
37
        return $this->bindings;
38
    }
39
}
40