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

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

phpmyfaq/inc/PMF/Faq.php 1 location

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