Completed
Push — master ( b54f87...bde51f )
by Beniamin
04:50
created

AbstractBuilder::getReferenceManager()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * This file is part of Phuria SQL Builder package.
5
 *
6
 * Copyright (c) 2016 Beniamin Jonatan Šimko
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Phuria\SQLBuilder\QueryBuilder;
13
14
use Phuria\SQLBuilder\Parameter\ParameterManager;
15
use Phuria\SQLBuilder\Parameter\ParameterManagerInterface;
16
use Phuria\SQLBuilder\QueryCompiler\QueryCompiler;
17
use Phuria\SQLBuilder\QueryCompiler\QueryCompilerInterface;
18
use Phuria\SQLBuilder\ReferenceManager;
19
use Phuria\SQLBuilder\TableFactory\TableFactory;
20
use Phuria\SQLBuilder\TableFactory\TableFactoryInterface;
21
22
/**
23
 * @author Beniamin Jonatan Šimko <[email protected]>
24
 */
25
abstract class AbstractBuilder
26
{
27 30
    public function __construct()
28
    {
29 30
        $this->tableFactory = new TableFactory();
0 ignored issues
show
Bug introduced by
The property tableFactory does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
30 30
        $this->queryCompiler = new QueryCompiler();
0 ignored issues
show
Bug introduced by
The property queryCompiler does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
31 30
        $this->parameterManager = new ParameterManager();
0 ignored issues
show
Bug introduced by
The property parameterManager does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
32 30
        $this->referenceManager = new ReferenceManager();
0 ignored issues
show
Bug introduced by
The property referenceManager does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
33 30
    }
34
35
    /**
36
     * @return AbstractBuilder
37
     */
38 27
    public function getQueryBuilder()
39
    {
40 27
        return $this;
41
    }
42
43
    /**
44
     * @return TableFactoryInterface
45
     */
46 26
    public function getTableFactory()
47
    {
48 26
        return $this->tableFactory;
49
    }
50
51
    /**
52
     * @return QueryCompilerInterface
53
     */
54 27
    public function getQueryCompiler()
55
    {
56 27
        return $this->queryCompiler;
57
    }
58
59
    /**
60
     * @return ParameterManagerInterface
61
     */
62 13
    public function getParameterManager()
63
    {
64 13
        return $this->parameterManager;
65
    }
66
67
    /**
68
     * @return ReferenceManager
69
     */
70 27
    public function getReferenceManager()
71
    {
72 27
        return $this->referenceManager;
73
    }
74
}