mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-24 11:59:09 -04:00
ALPHA 3.0.2a
This commit is contained in:
8
vendor/psy/psysh/src/VarDumper/Dumper.php
vendored
8
vendor/psy/psysh/src/VarDumper/Dumper.php
vendored
@@ -67,20 +67,20 @@ class Dumper extends CliDumper
|
||||
protected function style($style, $value, $attr = [])
|
||||
{
|
||||
if ('ref' === $style) {
|
||||
$value = strtr($value, '@', '#');
|
||||
$value = \strtr($value, '@', '#');
|
||||
}
|
||||
|
||||
$styled = '';
|
||||
$map = self::$controlCharsMap;
|
||||
$cchr = $this->styles['cchr'];
|
||||
|
||||
$chunks = preg_split(self::$controlCharsRx, $value, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
|
||||
$chunks = \preg_split(self::$controlCharsRx, $value, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
|
||||
foreach ($chunks as $chunk) {
|
||||
if (preg_match(self::$onlyControlCharsRx, $chunk)) {
|
||||
if (\preg_match(self::$onlyControlCharsRx, $chunk)) {
|
||||
$chars = '';
|
||||
$i = 0;
|
||||
do {
|
||||
$chars .= isset($map[$chunk[$i]]) ? $map[$chunk[$i]] : sprintf('\x%02X', ord($chunk[$i]));
|
||||
$chars .= isset($map[$chunk[$i]]) ? $map[$chunk[$i]] : \sprintf('\x%02X', \ord($chunk[$i]));
|
||||
} while (isset($chunk[++$i]));
|
||||
|
||||
$chars = $this->formatter->escape($chars);
|
||||
|
||||
14
vendor/psy/psysh/src/VarDumper/Presenter.php
vendored
14
vendor/psy/psysh/src/VarDumper/Presenter.php
vendored
@@ -49,14 +49,14 @@ class Presenter
|
||||
public function __construct(OutputFormatter $formatter, $forceArrayIndexes = false)
|
||||
{
|
||||
// Work around https://github.com/symfony/symfony/issues/23572
|
||||
$oldLocale = setlocale(LC_NUMERIC, 0);
|
||||
setlocale(LC_NUMERIC, 'C');
|
||||
$oldLocale = \setlocale(LC_NUMERIC, 0);
|
||||
\setlocale(LC_NUMERIC, 'C');
|
||||
|
||||
$this->dumper = new Dumper($formatter, $forceArrayIndexes);
|
||||
$this->dumper->setStyles($this->styles);
|
||||
|
||||
// Now put the locale back
|
||||
setlocale(LC_NUMERIC, $oldLocale);
|
||||
\setlocale(LC_NUMERIC, $oldLocale);
|
||||
|
||||
$this->cloner = new Cloner();
|
||||
$this->cloner->addCasters(['*' => function ($obj, array $a, Stub $stub, $isNested, $filter = 0) {
|
||||
@@ -116,8 +116,8 @@ class Presenter
|
||||
}
|
||||
|
||||
// Work around https://github.com/symfony/symfony/issues/23572
|
||||
$oldLocale = setlocale(LC_NUMERIC, 0);
|
||||
setlocale(LC_NUMERIC, 'C');
|
||||
$oldLocale = \setlocale(LC_NUMERIC, 0);
|
||||
\setlocale(LC_NUMERIC, 'C');
|
||||
|
||||
$output = '';
|
||||
$this->dumper->dump($data, function ($line, $depth) use (&$output) {
|
||||
@@ -125,12 +125,12 @@ class Presenter
|
||||
if ('' !== $output) {
|
||||
$output .= PHP_EOL;
|
||||
}
|
||||
$output .= str_repeat(' ', $depth) . $line;
|
||||
$output .= \str_repeat(' ', $depth) . $line;
|
||||
}
|
||||
});
|
||||
|
||||
// Now put the locale back
|
||||
setlocale(LC_NUMERIC, $oldLocale);
|
||||
\setlocale(LC_NUMERIC, $oldLocale);
|
||||
|
||||
return OutputFormatter::escape($output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user