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

SQLQuery   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 26
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getSQL() 0 4 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