TracyDumper::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Yep\WorkflowLogger\ContextDumper;
4
5
use Tracy\Dumper;
6
7
/**
8
 * Class TracyDumper
9
 *
10
 * @package Yep\WorkflowLogger\ContextDumper
11
 * @author  Martin Zeman (Zemistr) <[email protected]>
12
 */
13
class TracyDumper implements DumperInterface
14
{
15
    /**
16
     * @var array
17
     */
18
    protected $options;
19
20 1
    public function __construct(
21
      array $options = [Dumper::DEPTH => 8, Dumper::TRUNCATE => 512]
22
    ) {
23 1
        $this->options = $options;
24 1
    }
25
26 1
    public function dump(array $context)
27
    {
28 1
        return Dumper::toText($context, $this->options);
29
    }
30
}
31