HtmlDumper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A dumpVariable() 0 8 1
A dump() 0 7 1
1
<?php
2
3
namespace Facade\Ignition\DumpRecorder;
4
5
use Symfony\Component\VarDumper\Cloner\Data;
6
use Symfony\Component\VarDumper\Cloner\VarCloner;
7
use Symfony\Component\VarDumper\Dumper\HtmlDumper as BaseHtmlDumper;
8
9
class HtmlDumper extends BaseHtmlDumper
10
{
11
    protected $dumpHeader = '';
12
13
    public function dumpVariable($variable): string
14
    {
15
        $cloner = new VarCloner();
16
17
        $clonedData = $cloner->cloneVar($variable)->withMaxDepth(3);
18
19
        return $this->dump($clonedData);
20
    }
21
22
    public function dump(Data $data, $output = null, array $extraDisplayOptions = []): string
23
    {
24
        return parent::dump($data, true, [
25
            'maxDepth' => 3,
26
            'maxStringLength' => 160,
27
        ]);
28
    }
29
}
30