Code Duplication    Length = 7-7 lines in 2 locations

src/Statements/InsertStatement.php 1 location

@@ 121-127 (lines=7) @@
118
        $ret = 'INSERT ' . $this->options
119
            . ' INTO ' . $this->into;
120
121
        if ($this->values != NULL && count($this->values) > 0) {
122
            $ret .= ' VALUES ' . Array2d::build($this->values);
123
        } elseif ($this->set != NULL && count($this->set) > 0) {
124
            $ret .= ' SET ' . SetOperation::build($this->set);
125
        } elseif ($this->select != NULL && count($this->select) > 0) {
126
            $ret .= ' ' . $this->select->build();
127
        }
128
129
        if ($this->onDuplicateSet != NULL && count($this->onDuplicateSet) > 0) {
130
            $ret .= ' ON DUPLICATE KEY UPDATE ' . SetOperation::build($this->onDuplicateSet);

src/Statements/ReplaceStatement.php 1 location

@@ 99-105 (lines=7) @@
96
        $ret = 'REPLACE ' . $this->options
97
            . ' INTO ' . $this->into;
98
99
        if ($this->values != NULL && count($this->values) > 0) {
100
            $ret .= ' VALUES ' . Array2d::build($this->values);
101
        } elseif ($this->set != NULL && count($this->set) > 0) {
102
            $ret .= ' SET ' . SetOperation::build($this->set);
103
        } elseif ($this->select != NULL && count($this->select) > 0) {
104
            $ret .= ' ' . $this->select->build();
105
        }
106
107
        return $ret;
108
    }