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

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

phpmyfaq/inc/PMF/Faq.php 1 location

@@ 2852-2872 (lines=21) @@
2849
     *
2850
     * @author  Thorsten Rinne <[email protected]>
2851
     */
2852
    public function deletePermission($mode, $record_id)
2853
    {
2854
        if (!($mode == 'user' || $mode == 'group')) {
2855
            return false;
2856
        }
2857
        if (!is_int($record_id)) {
2858
            return false;
2859
        }
2860
2861
        $query = sprintf('
2862
            DELETE FROM
2863
                %sfaqdata_%s
2864
            WHERE
2865
                record_id = %d',
2866
            PMF_Db::getTablePrefix(),
2867
            $mode,
2868
            $record_id);
2869
        $this->_config->getDb()->query($query);
2870
2871
        return true;
2872
    }
2873
2874
    /**
2875
     * Returns the record permissions for users and groups.