Completed
Push — master ( 1699d0...1f5319 )
by Adrian
01:22
created

QueryFactory   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 4
dl 0
loc 33
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A newSelect() 0 4 1
A newInsert() 0 4 1
A newUpdate() 0 4 1
A newDelete() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Sirius\Sql;
5
6
use Atlas\Pdo\Connection;
7
8
class QueryFactory
9
{
10
11
    /**
12
     * @var Connection
13
     */
14
    protected $connection;
15
16
    public function __construct(Connection $connection)
17
    {
18
        $this->connection = $connection;
19
    }
20
21
    public function newSelect()
22
    {
23
        return new Select($this->connection);
24
    }
25
26
    public function newInsert()
27
    {
28
        return new Insert($this->connection);
29
    }
30
31
    public function newUpdate()
32
    {
33
        return new Update($this->connection);
34
    }
35
36
    public function newDelete()
37
    {
38
        return new Delete($this->connection);
39
    }
40
}