Completed
Push — master ( 755d2f...4eddf0 )
by Christopher
05:22
created

MySQLBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 12

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 36
wmc 2
lcom 1
cbo 12
ccs 0
cts 7
cp 0
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\CloneWithMethod;
8
use AsyncPHP\Icicle\Database\Builder\Method\DeleteMethod;
9
use AsyncPHP\Icicle\Database\Builder\Method\InsertMethod;
10
use AsyncPHP\Icicle\Database\Builder\Method\LimitMethod;
11
use AsyncPHP\Icicle\Database\Builder\Method\OrderByMethod;
12
use AsyncPHP\Icicle\Database\Builder\Method\OrWhereMethod;
13
use AsyncPHP\Icicle\Database\Builder\Method\SelectMethod;
14
use AsyncPHP\Icicle\Database\Builder\Method\TableMethod;
15
use AsyncPHP\Icicle\Database\Builder\Method\UpdateMethod;
16
use AsyncPHP\Icicle\Database\Builder\Method\WhereMethod;
17
use Aura\SqlQuery\QueryFactory;
18
19
final class MySQLBuilder implements Builder
20
{
21
    use BuildMethod;
22
    use CloneWithMethod;
23
    use DeleteMethod;
24
    use InsertMethod;
25
    use LimitMethod;
26
    use OrderByMethod;
27
    use OrWhereMethod;
28
    use SelectMethod;
29
    use TableMethod;
30
    use UpdateMethod;
31
    use WhereMethod;
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
    protected function factory()
47
    {
48
        if (!isset($this->factory)) {
49
            $this->factory = new QueryFactory("mysql");
50
        }
51
52
        return $this->factory;
53
    }
54
}
55