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 = 35-38 lines in 2 locations

phpmyfaq/inc/PMF/User.php 2 locations

@@ 320-354 (lines=35) @@
317
     * @param  bool   $raiseError Raise error?
318
     * @return bool
319
     */
320
    public function getUserByLogin($login, $raiseError = true)
321
    {
322
        $select = sprintf("
323
            SELECT
324
                user_id,
325
                login,
326
                account_status
327
            FROM
328
                %sfaquser
329
            WHERE
330
                login = '%s'",
331
            PMF_Db::getTablePrefix(),
332
            $this->config->getDb()->escape($login)
333
        );
334
        
335
        $res = $this->config->getDb()->query($select);
336
        if ($this->config->getDb()->numRows($res) !== 1) {
337
            if ($raiseError) {
338
339
                $this->errors[] = self::ERROR_USER_INCORRECT_LOGIN;
340
            }
341
            return false;
342
        }
343
        $user = $this->config->getDb()->fetchArray($res);
344
        $this->userId  = (int)    $user['user_id'];
345
        $this->login   = (string) $user['login'];
346
        $this->status  = (string) $user['account_status'];
347
348
        // get user-data
349
        if (!$this->userdata instanceof PMF_User_UserData) {
350
            $this->userdata = new PMF_User_UserData($this->config);
351
        }
352
        $this->userdata->load($this->getUserId());
353
        return true;
354
    }
355
356
    /**
357
     * loads basic user information from the database selecting the user with
@@ 364-401 (lines=38) @@
361
     *
362
     * @return boolean
363
     */
364
    public function getUserByCookie($cookie)
365
    {
366
        $select = sprintf("
367
            SELECT
368
                user_id,
369
                login,
370
                account_status
371
            FROM
372
                %sfaquser
373
            WHERE
374
                remember_me = '%s' AND account_status != 'blocked'",
375
            PMF_Db::getTablePrefix(),
376
            $this->config->getDb()->escape($cookie)
377
        );
378
379
        $res = $this->config->getDb()->query($select);
380
        if ($this->config->getDb()->numRows($res) !== 1) {
381
            $this->errors[] = self::ERROR_USER_INCORRECT_LOGIN;
382
            return false;
383
        }
384
        $user = $this->config->getDb()->fetchArray($res);
385
386
        // Don't ever login via anonymous user
387
        if (-1 === $user['user_id']) {
388
            return false;
389
        }
390
391
        $this->userId = (int)     $user['user_id'];
392
        $this->login   = (string) $user['login'];
393
        $this->status  = (string) $user['account_status'];
394
395
        // get user-data
396
        if (!$this->userdata instanceof PMF_User_UserData) {
397
            $this->userdata = new PMF_User_UserData($this->config);
398
        }
399
        $this->userdata->load($this->getUserId());
400
        return true;
401
    }
402
403
    /**
404
     * Checks if display name is already used. Returns true, if already in use