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

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