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

@@ 1555-1577 (lines=23) @@
1552
     *
1553
     * @return bool
1554
     */
1555
    public function deletePermission($mode, $categories)
1556
    {
1557
        if (!($mode == 'user' || $mode == 'group')) {
1558
            return false;
1559
        }
1560
        if (!is_array($categories)) {
1561
            return false;
1562
        }
1563
1564
        foreach ($categories as $category_id) {
1565
            $query = sprintf('
1566
                DELETE FROM
1567
                    %sfaqcategory_%s
1568
                WHERE
1569
                    category_id = %d',
1570
                PMF_Db::getTablePrefix(),
1571
                $mode,
1572
                $category_id);
1573
            $this->_config->getDb()->query($query);
1574
        }
1575
1576
        return true;
1577
    }
1578
1579
    /**
1580
     * Returns the category permissions for users and groups.

phpmyfaq/inc/PMF/Faq.php 1 location

@@ 2823-2843 (lines=21) @@
2820
     *
2821
     * @author  Thorsten Rinne <[email protected]>
2822
     */
2823
    public function deletePermission($mode, $record_id)
2824
    {
2825
        if (!($mode == 'user' || $mode == 'group')) {
2826
            return false;
2827
        }
2828
        if (!is_int($record_id)) {
2829
            return false;
2830
        }
2831
2832
        $query = sprintf('
2833
            DELETE FROM
2834
                %sfaqdata_%s
2835
            WHERE
2836
                record_id = %d',
2837
            PMF_Db::getTablePrefix(),
2838
            $mode,
2839
            $record_id);
2840
        $this->_config->getDb()->query($query);
2841
2842
        return true;
2843
    }
2844
2845
    /**
2846
     * Returns the record permissions for users and groups.