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 = 19-19 lines in 2 locations

code/control/ExportSecondHandProducts.php 1 location

@@ 219-237 (lines=19) @@
216
    /**
217
     * @return Boolean
218
     */
219
    function MyPermissionCheck()
220
    {
221
        $codesWithIPs = $this->Config()->get('secret_codes');
222
223
        //with a code you do not have to be logged in ...
224
        if(count($codesWithIPs)) {
225
            $ip = EcommerceCountry::get_ip();
226
            $code = $this->request->param('ID');
227
            if($code) {
228
                $testIP = isset($codesWithIPs[$code]) ? $codesWithIPs[$code] : false;
229
                if($testIP) {
230
                    if($testIP === $ip || $testIP === '*') {
231
                        return true;
232
                    }
233
                }
234
            }
235
        }
236
        return Permission::check('ADMIN');
237
    }
238
239
    protected function returnJSONorFile($array, $filenameAppendix = '')
240
    {

code/control/UpdateSecondHandProduct.php 1 location

@@ 59-77 (lines=19) @@
56
    /**
57
     * @return Boolean
58
     */
59
    function MyPermissionCheck()
60
    {
61
        $codesWithIPs = $this->Config()->get('secret_codes');
62
63
        //with a code you do not have to be logged in ...
64
        if(count($codesWithIPs)) {
65
            $ip = EcommerceCountry::get_ip();
66
            $code = $this->request->param('ID');
67
            if($code) {
68
                $testIP = isset($codesWithIPs[$code]) ? $codesWithIPs[$code] : false;
69
                if($testIP) {
70
                    if($testIP === $ip || $testIP === '*') {
71
                        return true;
72
                    }
73
                }
74
            }
75
        }
76
        return Permission::check('ADMIN');
77
    }
78
}
79