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/src/phpMyFAQ/Category.php 1 location

@@ 1744-1766 (lines=23) @@
1741
     *
1742
     * @return bool
1743
     */
1744
    public function deletePermission($mode, $categories)
1745
    {
1746
        if (!($mode == 'user' || $mode == 'group')) {
1747
            return false;
1748
        }
1749
        if (!is_array($categories)) {
1750
            return false;
1751
        }
1752
1753
        foreach ($categories as $category_id) {
1754
            $query = sprintf('
1755
                DELETE FROM
1756
                    %sfaqcategory_%s
1757
                WHERE
1758
                    category_id = %d',
1759
                Db::getTablePrefix(),
1760
                $mode,
1761
                $category_id);
1762
            $this->config->getDb()->query($query);
1763
        }
1764
1765
        return true;
1766
    }
1767
1768
    /**
1769
     * Returns the category permissions for users and groups.

phpmyfaq/src/phpMyFAQ/Faq.php 1 location

@@ 2774-2794 (lines=21) @@
2771
     *
2772
     * @author  Thorsten Rinne <[email protected]>
2773
     */
2774
    public function deletePermission($mode, $record_id)
2775
    {
2776
        if (!($mode == 'user' || $mode == 'group')) {
2777
            return false;
2778
        }
2779
        if (!is_int($record_id)) {
2780
            return false;
2781
        }
2782
2783
        $query = sprintf('
2784
            DELETE FROM
2785
                %sfaqdata_%s
2786
            WHERE
2787
                record_id = %d',
2788
            Db::getTablePrefix(),
2789
            $mode,
2790
            $record_id);
2791
        $this->config->getDb()->query($query);
2792
2793
        return true;
2794
    }
2795
2796
    /**
2797
     * Returns the record permissions for users and groups.