Completed
Push — master ( 6f2964...ca99e9 )
by Rasmus
02:54
created

SQLQuery::getSQL()   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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace mindplay\sql\model;
4
5
use mindplay\sql\framework\Query;
6
use mindplay\sql\framework\TypeProvider;
7
8
/**
9
 * This class represents a custom SQL Query.
10
 */
11
class SQLQuery extends Query
12
{
13
    /**
14
     * @var string
15
     */
16
    private $sql;
17
18
    /**
19
     * @param TypeProvider $types
20
     * @param string       $sql SQL statement (with placeholders)
21
     */
22 1
    public function __construct(TypeProvider $types, $sql)
23
    {
24 1
        parent::__construct($types);
25
        
26 1
        $this->sql = $sql;
27 1
    }
28
    
29
    /**
30
     * @inheritdoc
31
     */
32 1
    public function getSQL()
33
    {
34 1
        return $this->sql;
35
    }
36
}
37