New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor refactoring to `XdebugHandler@check` #5669

Merged
merged 1 commit into from Sep 12, 2016
Jump to file or symbol
Failed to load files and symbols.
+9 −12
Diff settings

Always

Just for now

Minor refactoring - Early exit

  • Loading branch information...
kamranahmedse committed Sep 12, 2016
commit 6990454e567a860411931135a838cf1f838cb49c
@@ -50,21 +50,18 @@ public function __construct(OutputInterface $output)
*/
public function check()
{
if (!$this->needsRestart()) {
$originalIniScanDir = getenv(self::ENV_INI_SCAN_DIR_OLD);
if ($originalIniScanDir) {
putenv(self::ENV_INI_SCAN_DIR_OLD);
putenv(self::ENV_INI_SCAN_DIR.'=' . $originalIniScanDir);
} else {
putenv(self::ENV_INI_SCAN_DIR);
}
if ($this->needsRestart()) {
$this->prepareRestart($command) && $this->restart($command);
return;
}
if ($this->prepareRestart($command)) {
$this->restart($command);
$originalIniScanDir = getenv(self::ENV_INI_SCAN_DIR_OLD);
if ($originalIniScanDir) {
putenv(self::ENV_INI_SCAN_DIR_OLD);
putenv(self::ENV_INI_SCAN_DIR . '=' . $originalIniScanDir);
} else {
putenv(self::ENV_INI_SCAN_DIR);
}
}