Completed
Push — master ( 6bd930...6adfd5 )
by Rasmus
02:26
created

SQLQuery::getMappers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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