UpdateBuilder   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 6
dl 0
loc 56
ccs 9
cts 9
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A isIgnore() 0 4 1
A setIgnore() 0 4 1
A update() 0 4 1
A addUpdate() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of UnderQuery 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\UnderQuery\QueryBuilder;
13
14
use Phuria\UnderQuery\Table\AbstractTable;
15
16
/**
17
 * @author Beniamin Jonatan Šimko <[email protected]>
18
 */
19
class UpdateBuilder extends AbstractBuilder implements
20
    Clause\JoinInterface,
21
    Clause\LimitInterface,
22
    Clause\OrderByInterface,
23
    Clause\SetInterface,
24
    Clause\WhereInterface
25
{
26
    use Clause\JoinTrait;
27
    use Clause\SetTrait;
28
    use Clause\WhereTrait;
29
    use Clause\OrderByTrait;
30
    use Clause\LimitTrait;
31
32
    /**
33
     * @var boolean
34
     */
35
    private $ignore = false;
36
37
    /**
38
     * @return boolean
39
     */
40 1
    public function isIgnore()
41
    {
42 1
        return $this->ignore;
43
    }
44
45
    /**
46
     * @param boolean $ignore
47
     */
48 1
    public function setIgnore($ignore)
49
    {
50 1
        $this->ignore = $ignore;
51 1
    }
52
53
    /**
54
     * @param mixed       $table
55
     * @param string|null $alias
56
     *
57
     * @return AbstractTable
58
     */
59 1
    public function update($table, $alias = null)
60
    {
61 1
        return $this->addUpdate($table, $alias);
62
    }
63
64
    /**
65
     * @param mixed       $table
66
     * @param string|null $alias
67
     *
68
     * @return AbstractTable
69
     */
70 1
    public function addUpdate($table, $alias = null)
71
    {
72 1
        return $this->addRootTable($table, $alias);
73
    }
74
}