Code Duplication    Length = 12-13 lines in 2 locations

src/Helper/Model.php 2 locations

@@ 176-188 (lines=13) @@
173
     *
174
     * @return bool
175
     */
176
    public function save($dbConnection = NULL)
177
    {
178
        $connection = DatabaseQuery::checkConnection($dbConnection);
179
180
        $query = $this->insertQuery(self::getTableName($connection));
181
        $statement = $connection->prepare($query);
182
        if( $statement->execute() )
183
        {
184
            return true;
185
        }
186
        throw new  DataAlreadyExistException();
187
188
    }
189
190
    /**
191
     * update()
@@ 196-207 (lines=12) @@
193
     *
194
     * @return bool
195
     */
196
    public function update($dbConnection = NULL)
197
    {
198
        $connection = DatabaseQuery::checkConnection($dbConnection);
199
200
        $updateQuery = $this->updateQuery(self::getTableName($connection));
201
        $statement = $connection->prepare($updateQuery);
202
        if( $statement->execute() )
203
        {
204
            return true;
205
        }
206
        throw new  DataAlreadyExistException();
207
    }
208
209
    /**
210
     * destroy($value)