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 = 17-20 lines in 3 locations

lib/Environment.php 3 locations

@@ 313-329 (lines=17) @@
310
        });
311
    }
312
    
313
    public function killProcessByPid($pid)
314
    {
315
        if ($this->isWindows()) {
316
            $cmd = 'taskkill /F /PID %d';
317
        } else {
318
            $cmd = 'kill -9 %d';
319
        }
320
321
        $cmd = sprintf($cmd, $pid);
322
323
        $output = $this->output;
324
325
        $process = new Process($cmd, SeleniumSetup::$APP_ROOT_PATH, SeleniumSetup::$APP_PROCESS_ENV, null, null);
326
        $process->run(function($type, $line) use ($output) {
327
            $output->write($line);
328
        });
329
    }
330
331
    public function killProcessByName($processName)
332
    {
@@ 331-347 (lines=17) @@
328
        });
329
    }
330
331
    public function killProcessByName($processName)
332
    {
333
        if ($this->isWindows()) {
334
            $cmd = 'taskkill /F /IM %s';
335
        } else {
336
            $cmd = 'pgrep -f "%s" | xargs kill';
337
        }
338
339
        $cmd = sprintf($cmd, $processName);
340
341
        $output = $this->output;
342
343
        $process = new Process($cmd, SeleniumSetup::$APP_ROOT_PATH, SeleniumSetup::$APP_PROCESS_ENV, null, null);
344
        $process->run(function($type, $line) use ($output) {
345
            $output->write($line);
346
        });
347
    }
348
349
    public function listenToPort($port)
350
    {
@@ 349-368 (lines=20) @@
346
        });
347
    }
348
349
    public function listenToPort($port)
350
    {
351
        if ($this->isWindows()) {
352
            $cmd = 'netstat -ano|findstr :%d';
353
        } else {
354
            $cmd = 'netstat -tulpn | grep :%d';
355
        }
356
357
        $cmd = sprintf($cmd, $port);
358
359
        $output = new BufferedOutput();
360
361
        $process = new Process($cmd, SeleniumSetup::$APP_ROOT_PATH, SeleniumSetup::$APP_PROCESS_ENV, null, null);
362
        $process->run(function($type, $line) use ($output) {
363
            $output->write($line);
364
        });
365
        
366
        return $output->fetch();
367
        
368
    }
369
    
370
    public function getPidFromListeningToPort($port)
371
    {