Insert   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A partName() 0 4 1
A getColumns() 0 6 1
1
<?php
2
/**
3
 * Author: Nil Portugués Calderó <[email protected]>
4
 * Date: 6/3/14
5
 * Time: 12:07 AM.
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace NilPortugues\Sql\QueryBuilder\Manipulation;
12
13
use NilPortugues\Sql\QueryBuilder\Syntax\SyntaxFactory;
14
15
/**
16
 * Class Insert.
17
 */
18
class Insert extends AbstractCreationalQuery
19
{
20
    /**
21
     * @return string
22
     */
23
    public function partName()
24
    {
25
        return 'INSERT';
26
    }
27
28
    /**
29
     * @return array
30
     */
31
    public function getColumns()
32
    {
33
        $columns = \array_keys($this->values);
34
35
        return SyntaxFactory::createColumns($columns, $this->getTable());
36
    }
37
}
38