SqlQuery   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 2
cbo 3
dl 0
loc 42
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A raw() 0 6 1
A parameters() 0 6 1
A build() 0 4 1
1
<?php
2
3
/**
4
 * @author Jared King <[email protected]>
5
 *
6
 * @see http://jaredtking.com
7
 *
8
 * @copyright 2015 Jared King
9
 * @license MIT
10
 */
11
12
namespace JAQB\Query;
13
14
use JAQB\Operations\Executable;
15
use JAQB\Operations\Fetchable;
16
17
class SqlQuery extends AbstractQuery
18
{
19
    use Executable;
20
    use Fetchable;
21
22
    /**
23
     * @var string
24
     */
25
    protected $sql;
26
27
    /**
28
     * Sets the SQL for the query.
29
     *
30
     * @param string $sql
31
     *
32
     * @return self
33
     */
34
    public function raw($sql)
35
    {
36
        $this->sql = $sql;
37
38
        return $this;
39
    }
40
41
    /**
42
     * Sets the parameters for this query to be injected
43
     * into the prepared statement.
44
     *
45
     * @return self
46
     */
47
    public function parameters(array $values)
48
    {
49
        $this->values = $values;
50
51
        return $this;
52
    }
53
54
    public function build()
55
    {
56
        return $this->sql;
57
    }
58
}
59