Skip to content

Commit 43bc636

Browse files
authored
Merge pull request #13 from PHPCSStandards/feature/tokenlist-dont-touch-xdebug-settings
Debug/TokenList: no need to touch Xdebug settings
2 parents 72145f0 + 18f7752 commit 43bc636

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

Debug/Sniffs/Debug/TokenListSniff.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ public function process(File $phpcsFile, $stackPtr)
6565
$ptrPadding = max(3, strlen($last));
6666
$linePadding = strlen($tokens[$last]['line']);
6767

68-
$oldIniValue = \ini_set('xdebug.overload_var_dump', 1);
69-
7068
echo \PHP_EOL;
7169
echo \str_pad('Ptr', $ptrPadding, ' ', \STR_PAD_BOTH),
7270
' :: ', \str_pad('Ln', ($linePadding + 1), ' ', \STR_PAD_BOTH),
@@ -108,11 +106,6 @@ public function process(File $phpcsFile, $stackPtr)
108106
' :: [', $token['length'], ']: ', $content, \PHP_EOL;
109107
}
110108

111-
// If necessary, reset the ini setting.
112-
if ($oldIniValue !== false) {
113-
\ini_set('xdebug.overload_var_dump', $oldIniValue);
114-
}
115-
116109
// Only do this once per file.
117110
return ($phpcsFile->numTokens + 1);
118111
}

0 commit comments

Comments
 (0)