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

DBug::__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
 * DBug Dumper
8
 *
9
 * A bridge allowing to use dBug as a Dumper within the Debug subcomponent. Check out dBug itself on
10
 * Github at {@see https://github.com/ospinto/dBug}.
11
 *
12
 * Requires:
13
 * - Package: ospinto/dbug (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
 * @todo        Readable breaks between each variable dump.
20
 */
21
class DBug implements interfaces\Dumper
22
{
23
    /**
24
     * {@inheritDoc}
25
     */
26
    public function __invoke(...$vars)
27
    {
28
        // dBug isn't variadic so we need to adapt.
29
        foreach ($vars as $var) {
30
            new \dBug($var);
31
        }
32
    }
33
}
34