Code Duplication    Length = 12-12 lines in 2 locations

DbUser.php 2 locations

@@ 280-291 (lines=12) @@
277
     *
278
     * @return bool TRUE on success or FALSE on failure.
279
     */
280
    public function grantPrivileges($username, $privileges = self::PRIVILEGE_USAGE, $database = '*', $table = '*')
281
    {
282
        $sqlQuery = $this->changePrivilegesQuery(
283
            self::PRIVILEGE_STATEMENT_GRANT,
284
            $username,
285
            $privileges,
286
            $database,
287
            $table
288
        );
289
290
        return $this->connection->exec($sqlQuery) !== false;
291
    }
292
293
    /**
294
     * Revoke privileges to mysql user.
@@ 305-316 (lines=12) @@
302
     *
303
     * @return bool TRUE on success or FALSE on failure.
304
     */
305
    public function revokePrivileges($username, $privileges = self::PRIVILEGE_USAGE, $database = '*', $table = '*')
306
    {
307
        $sqlQuery = $this->changePrivilegesQuery(
308
            self::PRIVILEGE_STATEMENT_REVOKE,
309
            $username,
310
            $privileges,
311
            $database,
312
            $table
313
        );
314
315
        return $this->connection->exec($sqlQuery) !== false;
316
    }
317
318
    /**
319
     * Flush privileges.