Completed
Push — master ( 4ccffb...101fcc )
by Beniamin
03:58
created

AbstractInsertBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 22
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A into() 0 8 2
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\Table\AbstractTable;
15
16
/**
17
 * @author Beniamin Jonatan Šimko <[email protected]>
18
 */
19
abstract class AbstractInsertBuilder extends AbstractBuilder implements
20
    Clause\InsertColumnsClauseInterface,
21
    Component\TableComponentInterface
22
{
23
    use Clause\InsertColumnsClauseTrait;
24
    use Component\TableComponentTrait;
25
26
    /**
27
     * @param mixed $table
28
     * @param array $columns
29
     *
30
     * @return AbstractTable
31
     */
32 2
    public function into($table, array $columns = [])
33
    {
34 2
        if (count($columns)) {
35 1
            $this->setColumns($columns);
36 1
        }
37
38 2
        return $this->addRootTable($table);
39
    }
40
}