Code Duplication    Length = 14-14 lines in 2 locations

framework/db/DBTimedObject.php 2 locations

@@ 65-78 (lines=14) @@
62
     * @return int Returns the number of affected rows on success, and -1 if
63
     *            the last query failed.
64
     */
65
    public function saveActivationFlag() {
66
        $this->changeUpdateTime();
67
68
        return DBCore::doUpdateQuery(
69
            "UPDATE " . static::TABLE_NAME . "
70
                SET activation = ?,
71
                    update_time = ?,
72
                    update_user_id = ?
73
             WHERE " . static::ID_FIELD_NAME . " = ?
74
             LIMIT 1",
75
            "isii",
76
            [$this->activation, $this->updateTime, $this->updateUserId, $this->id]
77
        );
78
    }
79
80
    /**
81
     * Saves removement flag to the database.
@@ 86-99 (lines=14) @@
83
     * @return int Returns the number of affected rows on success, and -1 if
84
     *            the last query failed.
85
     */
86
    public function saveRemovementFlag() {
87
        $this->changeUpdateTime();
88
89
        return DBCore::doUpdateQuery(
90
            "UPDATE " . static::TABLE_NAME . "
91
                SET removed = ?,
92
                    update_time = ?,
93
                    update_user_id = ?
94
             WHERE " . static::ID_FIELD_NAME . " = ?
95
             LIMIT 1",
96
            "isii",
97
            [$this->removed, $this->updateTime, $this->updateUserId, $this->id]
98
        );
99
    }
100
101
}
102