Completed
Push — master ( 759854...e46a01 )
by Martin
13:10 queued 03:41
created

TracyDumper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A dump() 0 3 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
    public function __construct(
21
      array $options = [Dumper::DEPTH => 8, Dumper::TRUNCATE => 512]
22
    ) {
23
        $this->options = $options;
24
    }
25
26
    public function dump(array $context)
27
    {
28
        return Dumper::toText($context, $this->options);
29
    }
30
}
31