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

InsertBuilder::insert()   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 1
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\Table\AbstractTable;
15
16
/**
17
 * @author Beniamin Jonatan Šimko <[email protected]>
18
 */
19
class InsertBuilder extends AbstractBuilder implements
20
    Clause\InsertColumnsClauseInterface,
21
    Component\InsertValuesComponentInterface,
22
    Component\QueryComponentInterface,
23
    Component\TableComponentInterface
24
{
25
    use Clause\InsertColumnsClauseTrait;
26
    use Component\InsertValuesComponentTrait;
27
    use Component\QueryComponentTrait;
28
    use Component\TableComponentTrait;
29
30
    /**
31
     * @param mixed $table
32
     *
33
     * @return AbstractTable
34
     */
35 1
    public function insert($table)
36
    {
37 1
        return $this->addRootTable($table);
38
    }
39
}