GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 36-40 lines in 2 locations

phpmyfaq/src/phpMyFAQ/User.php 2 locations

@@ 338-373 (lines=36) @@
335
     *
336
     * @return bool
337
     */
338
    public function getUserByLogin($login, $raiseError = true)
339
    {
340
        $select = sprintf("
341
            SELECT
342
                user_id,
343
                login,
344
                account_status
345
            FROM
346
                %sfaquser
347
            WHERE
348
                login = '%s'",
349
            Db::getTablePrefix(),
350
            $this->config->getDb()->escape($login)
351
        );
352
353
        $res = $this->config->getDb()->query($select);
354
        if ($this->config->getDb()->numRows($res) !== 1) {
355
            if ($raiseError) {
356
                $this->errors[] = self::ERROR_USER_INCORRECT_LOGIN;
357
            }
358
359
            return false;
360
        }
361
        $user = $this->config->getDb()->fetchArray($res);
362
        $this->userId = (int)$user['user_id'];
363
        $this->login = (string)$user['login'];
364
        $this->status = (string)$user['account_status'];
365
366
        // get user-data
367
        if (!$this->userdata instanceof UserData) {
368
            $this->userdata = new UserData($this->config);
369
        }
370
        $this->userdata->load($this->getUserId());
371
372
        return true;
373
    }
374
375
    /**
376
     * loads basic user information from the database selecting the user with
@@ 383-422 (lines=40) @@
380
     *
381
     * @return bool
382
     */
383
    public function getUserByCookie($cookie)
384
    {
385
        $select = sprintf("
386
            SELECT
387
                user_id,
388
                login,
389
                account_status
390
            FROM
391
                %sfaquser
392
            WHERE
393
                remember_me = '%s' AND account_status != 'blocked'",
394
            Db::getTablePrefix(),
395
            $this->config->getDb()->escape($cookie)
396
        );
397
398
        $res = $this->config->getDb()->query($select);
399
        if ($this->config->getDb()->numRows($res) !== 1) {
400
            $this->errors[] = self::ERROR_USER_INCORRECT_LOGIN;
401
402
            return false;
403
        }
404
        $user = $this->config->getDb()->fetchArray($res);
405
406
        // Don't ever login via anonymous user
407
        if (-1 === $user['user_id']) {
408
            return false;
409
        }
410
411
        $this->userId = (int)$user['user_id'];
412
        $this->login = (string)$user['login'];
413
        $this->status = (string)$user['account_status'];
414
415
        // get user-data
416
        if (!$this->userdata instanceof UserData) {
417
            $this->userdata = new UserData($this->config);
418
        }
419
        $this->userdata->load($this->getUserId());
420
421
        return true;
422
    }
423
424
    /**
425
     * Checks if display name is already used. Returns true, if already in use.