1
0
Fork 0

Merge pull request #5669 from kamranahmedse/master

Minor refactoring to `XdebugHandler@check`
pull/5518/merge
Jordi Boggiano 2016-09-12 19:47:40 +02:00 committed by GitHub
commit 2e8ddfb86f
1 changed files with 9 additions and 12 deletions

View File

@ -50,22 +50,19 @@ class XdebugHandler
*/
public function check()
{
if (!$this->needsRestart()) {
if ($this->needsRestart()) {
$this->prepareRestart($command) && $this->restart($command);
return;
}
$originalIniScanDir = getenv(self::ENV_INI_SCAN_DIR_OLD);
if ($originalIniScanDir) {
putenv(self::ENV_INI_SCAN_DIR_OLD);
putenv(self::ENV_INI_SCAN_DIR.'=' . $originalIniScanDir);
putenv(self::ENV_INI_SCAN_DIR . '=' . $originalIniScanDir);
} else {
putenv(self::ENV_INI_SCAN_DIR);
}
return;
}
if ($this->prepareRestart($command)) {
$this->restart($command);
}
}
/**