SQLQuery   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 27
ccs 7
cts 7
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMappers() 0 3 1
A __construct() 0 5 1
A getSQL() 0 3 1
1
<?php
2
3
namespace mindplay\sql\model\query;
4
5
use mindplay\sql\framework\MapperProvider;
6
use mindplay\sql\model\components\Mappers;
7
use mindplay\sql\model\TypeProvider;
8
9
/**
10
 * This class represents a custom SQL Query.
11
 */
12
class SQLQuery extends Query implements MapperProvider
13
{
14
    use Mappers;
15
    
16
    private string $sql;
17
18
    /**
19
     * @param $sql SQL statement (with placeholders)
20
     */
21 1
    public function __construct(TypeProvider $types, string $sql)
22
    {
23 1
        parent::__construct($types);
24
        
25 1
        $this->sql = $sql;
26
    }
27
    
28 1
    public function getSQL(): string
29
    {
30 1
        return $this->sql;
31
    }
32
33
    /**
34
     * @inheritdoc
35
     */
36 1
    public function getMappers(): array
37
    {
38 1
        return $this->mappers;
39
    }
40
}
41