Code Duplication    Length = 10-12 lines in 2 locations

lib/Config/Storage/RelationalDatabase.php 2 locations

@@ 143-154 (lines=12) @@
140
        return $check && $check['cnt'] > 0;
141
    }
142
143
    protected function doInsert(Sql $sql, $path, $value, $context)
144
    {
145
        $insert = $sql->insert(self::TABLE);
146
        $insert->values([
147
            'path'      => $path,
148
            'value'     => $value,
149
            'context'   => $context
150
        ]);
151
        $insert = $insert->getSqlString($this->adapter->getPlatform());
152
153
        $this->adapter->query($insert)->execute();
154
    }
155
156
    protected function doUpdate(Sql $sql, $path, $value, $context)
157
    {
@@ 156-165 (lines=10) @@
153
        $this->adapter->query($insert)->execute();
154
    }
155
156
    protected function doUpdate(Sql $sql, $path, $value, $context)
157
    {
158
        $update = $sql->update(self::TABLE);
159
        $update->set([
160
            'value' => $value
161
        ])->where(['path' => $path, 'context' => $context]);
162
163
        $update = $update->getSqlString($this->adapter->getPlatform());
164
        $this->adapter->query($update)->execute();
165
    }
166
167
    public function create()
168
    {