Code Duplication    Length = 12-13 lines in 2 locations

src/Helper/Model.php 2 locations

@@ 131-143 (lines=13) @@
128
     *
129
     * @return bool
130
     */
131
    public function save($dbConnection = NULL)
132
    {
133
        $connection = DatabaseQuery::checkConnection($dbConnection);
134
135
        $query = $this->insertQuery(self::getTableName($connection));
136
        $statement = $connection->prepare($query);
137
        if( $statement->execute() )
138
        {
139
            return true;
140
        }
141
        throw new  SaveUserExistException();
142
143
    }
144
145
    /**
146
     * update()
@@ 151-162 (lines=12) @@
148
     *
149
     * @return bool
150
     */
151
    public function update($dbConnection = NULL)
152
    {
153
        $connection = DatabaseQuery::checkConnection($dbConnection);
154
155
        $updateQuery = $this->updateQuery(self::getTableName($connection));
156
        $statement = $connection->prepare($updateQuery);
157
        if( $statement->execute() )
158
        {
159
            return true;
160
        }
161
        throw new  SaveUserExistException();
162
    }
163
164
    /**
165
     * destroy($value)