Completed
Push — master ( d819e3...4fe283 )
by Christopher
03:01 queued 12s
created

MySQLBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 12

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A factory() 0 8 2
1
<?php
2
3
namespace AsyncPHP\Icicle\Database\Builder;
4
5
use AsyncPHP\Icicle\Database\Builder;
6
use AsyncPHP\Icicle\Database\Builder\Method\BuildMethod;
7
use AsyncPHP\Icicle\Database\Builder\Method\DeleteMethod;
8
use AsyncPHP\Icicle\Database\Builder\Method\InsertMethod;
9
use AsyncPHP\Icicle\Database\Builder\Method\LimitMethod;
10
use AsyncPHP\Icicle\Database\Builder\Method\OrderByMethod;
11
use AsyncPHP\Icicle\Database\Builder\Method\OrWhereMethod;
12
use AsyncPHP\Icicle\Database\Builder\Method\SelectMethod;
13
use AsyncPHP\Icicle\Database\Builder\Method\TableMethod;
14
use AsyncPHP\Icicle\Database\Builder\Method\UpdateMethod;
15
use AsyncPHP\Icicle\Database\Builder\Method\WhereMethod;
16
use AsyncPHP\Icicle\Database\Method\CloneWithMethod;
17
use Aura\SqlQuery\QueryFactory;
18
19
final class MySQLBuilder implements Builder
20
{
21
    use BuildMethod;
22
    use DeleteMethod;
23
    use InsertMethod;
24
    use LimitMethod;
25
    use OrderByMethod;
26
    use OrWhereMethod;
27
    use SelectMethod;
28
    use TableMethod;
29
    use UpdateMethod;
30
    use WhereMethod;
31
    use CloneWithMethod;
32
33
    /**
34
     * @var QueryFactory
35
     */
36
    protected $factory;
37
38
    /**
39
     * @var QueryInterface
40
     */
41
    protected $query;
42
43
    /**
44
     * @return QueryFactory
45
     */
46 1
    protected function factory()
47
    {
48 1
        if (!isset($this->factory)) {
49 1
            $this->factory = new QueryFactory("mysql");
50 1
        }
51
52 1
        return $this->factory;
53
    }
54
}
55