Completed
Push — master ( 9a9f60...45932f )
by Michał
02:53
created

Tracy::__invoke()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
1
<?php namespace nyx\diagnostics\debug\dumpers;
2
3
// Internal dependencies
4
use nyx\diagnostics\debug\interfaces;
5
6
/**
7
 * Tracy Dumper
8
 *
9
 * A bridge allowing to use Tracy as a Dumper within the Debug subcomponent. Check out Tracy itself on
10
 * Github at {@see https://github.com/nette/tracy}.
11
 *
12
 * Requires:
13
 * - Package: tracy/tracy (available as suggestion for nyx/diagnostics within Composer)
14
 *
15
 * @version     0.1.0
16
 * @author      Michal Chojnacki <[email protected]>
17
 * @copyright   2012-2017 Nyx Dev Team
18
 * @link        https://github.com/unyx/nyx
19
 */
20
class Tracy implements interfaces\Dumper
21
{
22
    /**
23
     * {@inheritDoc}
24
     */
25
    public function __invoke(...$vars)
26
    {
27
        // Tracy isn't variadic so we need to adapt.
28
        foreach ($vars as $var) {
29
            \Tracy\Dumper::dump($var);
30
        }
31
    }
32
}
33