package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -31,23 +31,19 @@ use Symfony\Component\VarDumper\Server\Connection;
*/
class DumpDataCollector extends DataCollector implements DataDumperInterface
{
private $stopwatch;
private $fileLinkFormat;
private $dataCount = 0;
private $isCollected = true;
private $clonesCount = 0;
private $clonesIndex = 0;
private $rootRefs;
private $charset;
private $requestStack;
private $dumper;
private $sourceContextProvider;
private ?Stopwatch $stopwatch = null;
private string|FileLinkFormatter|false $fileLinkFormat;
private int $dataCount = 0;
private bool $isCollected = true;
private int $clonesCount = 0;
private int $clonesIndex = 0;
private array $rootRefs;
private string $charset;
private ?RequestStack $requestStack;
private DataDumperInterface|Connection|null $dumper;
private mixed $sourceContextProvider;
/**
* @param string|FileLinkFormatter|null $fileLinkFormat
* @param DataDumperInterface|Connection|null $dumper
*/
public function __construct(Stopwatch $stopwatch = null, $fileLinkFormat = null, string $charset = null, RequestStack $requestStack = null, $dumper = null)
public function __construct(Stopwatch $stopwatch = null, string|FileLinkFormatter $fileLinkFormat = null, string $charset = null, RequestStack $requestStack = null, DataDumperInterface|Connection $dumper = null)
{
$fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
$this->stopwatch = $stopwatch;
@@ -74,9 +70,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
public function dump(Data $data)
{
if ($this->stopwatch) {
$this->stopwatch->start('dump');
}
$this->stopwatch?->start('dump');
['name' => $name, 'file' => $file, 'line' => $line, 'file_excerpt' => $fileExcerpt] = $this->sourceContextProvider->getContext();
@@ -96,9 +90,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
$this->data[] = compact('data', 'name', 'file', 'line', 'fileExcerpt');
++$this->dataCount;
if ($this->stopwatch) {
$this->stopwatch->stop('dump');
}
$this->stopwatch?->stop('dump');
}
public function collect(Request $request, Response $response, \Throwable $exception = null)
@@ -138,9 +130,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
public function reset()
{
if ($this->stopwatch) {
$this->stopwatch->reset();
}
$this->stopwatch?->reset();
$this->data = [];
$this->dataCount = 0;
$this->isCollected = true;