Code Duplication    Length = 15-15 lines in 2 locations

src/class/SqlInsert.php 1 location

@@ 22-36 (lines=15) @@
19
     * @param array              $columns    (default: null) Datas to add
20
     *  Format is array('columnName' => 'value', ...);
21
     */
22
    public function __construct(
23
        SqlConnect $sqlConnect,
24
        $tableName,
25
        $columns = null
26
    )
27
    {
28
        parent::__construct($sqlConnect);
29
        
30
        $prefix      = $sqlConnect->getConnectionInfos()->tablePrefix;
31
        $this->table = $prefix.$tableName;
32
        
33
        if (is_array($columns)) {
34
            $this->columns = $columns;
35
        }
36
    }
37
    
38
    /**
39
     * {@inheritdoc}

src/class/SqlUpdate.php 1 location

@@ 22-36 (lines=15) @@
19
     * @param array              $columns    (default: null) Datas to add
20
     *  Format is array('columnName' => 'value', ...);
21
     */
22
    public function __construct(
23
        SqlConnect $sqlConnect,
24
        $tableName,
25
        $columns = null
26
    )
27
    {
28
        parent::__construct($sqlConnect);
29
        
30
        $prefix      = $sqlConnect->getConnectionInfos()->tablePrefix;
31
        $this->table = $prefix.$tableName;
32
        
33
        if (is_array($columns)) {
34
            $this->columns = $columns;
35
        }
36
    }
37
    
38
    /**
39
     * {@inheritdoc}