upgraded dependencies

This commit is contained in:
RafficMohammed
2023-01-08 01:59:16 +05:30
parent 51056e3aad
commit f9ae387337
6895 changed files with 133617 additions and 178680 deletions

View File

@@ -116,21 +116,16 @@ class HtmlDumper extends CliDumper
/**
* Sets an HTML header that will be dumped once in the output stream.
*
* @param string $header An HTML string
*/
public function setDumpHeader($header)
public function setDumpHeader(?string $header)
{
$this->dumpHeader = $header;
}
/**
* Sets an HTML prefix and suffix that will encapse every single dump.
*
* @param string $prefix The prepended HTML string
* @param string $suffix The appended HTML string
*/
public function setDumpBoundaries($prefix, $suffix)
public function setDumpBoundaries(string $prefix, string $suffix)
{
$this->dumpPrefix = $prefix;
$this->dumpSuffix = $suffix;
@@ -171,6 +166,9 @@ var refStyle = doc.createElement('style'),
e.addEventListener(n, cb, false);
};
refStyle.innerHTML = 'pre.sf-dump .sf-dump-compact, .sf-dump-str-collapse .sf-dump-str-collapse, .sf-dump-str-expand .sf-dump-str-expand { display: none; }';
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
refStyle = doc.createElement('style');
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
if (!doc.addEventListener) {
@@ -424,19 +422,13 @@ return function (root, x) {
a.innerHTML += ' ';
}
a.title = (a.title ? a.title+'\n[' : '[')+keyHint+'+click] Expand all children';
a.innerHTML += '<span>▼</span>';
a.innerHTML += elt.className == 'sf-dump-compact' ? '<span>▶</span>' : '<span>▼</span>';
a.className += ' sf-dump-toggle';
x = 1;
if ('sf-dump' != elt.parentNode.className) {
x += elt.parentNode.getAttribute('data-depth')/1;
}
elt.setAttribute('data-depth', x);
var className = elt.className;
elt.className = 'sf-dump-expanded';
if (className ? 'sf-dump-expanded' !== className : (x > options.maxDepth)) {
toggle(a);
}
} else if (/\bsf-dump-ref\b/.test(elt.className) && (a = elt.getAttribute('href'))) {
a = a.slice(1);
elt.className += ' '+a;
@@ -671,9 +663,6 @@ pre.sf-dump:after {
pre.sf-dump span {
display: inline;
}
pre.sf-dump .sf-dump-compact {
display: none;
}
pre.sf-dump a {
text-decoration: none;
cursor: pointer;
@@ -705,12 +694,6 @@ pre.sf-dump code {
padding:0;
background:none;
}
.sf-dump-str-collapse .sf-dump-str-collapse {
display: none;
}
.sf-dump-str-expand .sf-dump-str-expand {
display: none;
}
.sf-dump-public.sf-dump-highlight,
.sf-dump-protected.sf-dump-highlight,
.sf-dump-private.sf-dump-highlight,
@@ -802,11 +785,12 @@ EOHTML
/**
* {@inheritdoc}
*/
public function dumpString(Cursor $cursor, $str, $bin, $cut)
public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut)
{
if ('' === $str && isset($cursor->attr['img-data'], $cursor->attr['content-type'])) {
$this->dumpKey($cursor);
$this->line .= $this->style('default', $cursor->attr['img-size'] ?? '', []).' <samp>';
$this->line .= $this->style('default', $cursor->attr['img-size'] ?? '', []);
$this->line .= $cursor->depth >= $this->displayOptions['maxDepth'] ? ' <samp class=sf-dump-compact>' : ' <samp class=sf-dump-expanded>';
$this->endValue($cursor);
$this->line .= $this->indentPad;
$this->line .= sprintf('<img src="data:%s;base64,%s" /></samp>', $cursor->attr['content-type'], base64_encode($cursor->attr['img-data']));
@@ -819,25 +803,23 @@ EOHTML
/**
* {@inheritdoc}
*/
public function enterHash(Cursor $cursor, $type, $class, $hasChild)
public function enterHash(Cursor $cursor, int $type, $class, bool $hasChild)
{
if (Cursor::HASH_OBJECT === $type) {
$cursor->attr['depth'] = $cursor->depth;
}
parent::enterHash($cursor, $type, $class, false);
if ($cursor->skipChildren) {
if ($cursor->skipChildren || $cursor->depth >= $this->displayOptions['maxDepth']) {
$cursor->skipChildren = false;
$eol = ' class=sf-dump-compact>';
} elseif ($this->expandNextHash) {
} else {
$this->expandNextHash = false;
$eol = ' class=sf-dump-expanded>';
} else {
$eol = '>';
}
if ($hasChild) {
$this->line .= '<samp';
$this->line .= '<samp data-depth='.($cursor->depth + 1);
if ($cursor->refIndex) {
$r = Cursor::HASH_OBJECT !== $type ? 1 - (Cursor::HASH_RESOURCE !== $type) : 2;
$r .= $r && 0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->refIndex;
@@ -852,7 +834,7 @@ EOHTML
/**
* {@inheritdoc}
*/
public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut)
public function leaveHash(Cursor $cursor, int $type, $class, bool $hasChild, int $cut)
{
$this->dumpEllipsis($cursor, $hasChild, $cut);
if ($hasChild) {
@@ -864,7 +846,7 @@ EOHTML
/**
* {@inheritdoc}
*/
protected function style($style, $value, $attr = [])
protected function style(string $style, string $value, array $attr = [])
{
if ('' === $value) {
return '';
@@ -959,7 +941,7 @@ EOHTML
/**
* {@inheritdoc}
*/
protected function dumpLine($depth, $endOfValue = false)
protected function dumpLine(int $depth, bool $endOfValue = false)
{
if (-1 === $this->lastDepth) {
$this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line;