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 = 21-23 lines in 2 locations

phpmyfaq/inc/PMF/Category.php 1 location

@@ 1528-1550 (lines=23) @@
1525
     *
1526
     * @return bool
1527
     */
1528
    public function deletePermission($mode, $categories)
1529
    {
1530
        if (!($mode == 'user' || $mode == 'group')) {
1531
            return false;
1532
        }
1533
        if (!is_array($categories)) {
1534
            return false;
1535
        }
1536
1537
        foreach ($categories as $category_id) {
1538
            $query = sprintf('
1539
                DELETE FROM
1540
                    %sfaqcategory_%s
1541
                WHERE
1542
                    category_id = %d',
1543
                PMF_Db::getTablePrefix(),
1544
                $mode,
1545
                $category_id);
1546
            $this->_config->getDb()->query($query);
1547
        }
1548
1549
        return true;
1550
    }
1551
1552
    /**
1553
     * Returns the category permissions for users and groups.

phpmyfaq/inc/PMF/Faq.php 1 location

@@ 2743-2763 (lines=21) @@
2740
     *
2741
     * @author  Thorsten Rinne <[email protected]>
2742
     */
2743
    public function deletePermission($mode, $record_id)
2744
    {
2745
        if (!($mode == 'user' || $mode == 'group')) {
2746
            return false;
2747
        }
2748
        if (!is_int($record_id)) {
2749
            return false;
2750
        }
2751
2752
        $query = sprintf('
2753
            DELETE FROM
2754
                %sfaqdata_%s
2755
            WHERE
2756
                record_id = %d',
2757
            PMF_Db::getTablePrefix(),
2758
            $mode,
2759
            $record_id);
2760
        $this->_config->getDb()->query($query);
2761
2762
        return true;
2763
    }
2764
2765
    /**
2766
     * Returns the record permissions for users and groups.