Code Duplication    Length = 14-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
        parent::__construct($sqlConnect);
28
        
29
        $prefix          = $sqlConnect->getConnectionInfos()->tablePrefix;
30
        $this->tableName = $prefix.$tableName;
31
        
32
        if (is_array($columns)) {
33
            $this->columns = $columns;
34
        }
35
    }
36
    
37
    /**
38
     * {@inheritdoc}
39
     */

src/class/SqlUpdate.php 1 location

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