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

QueryFactory::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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
}