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

Dump_r::__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
// Vendor dependencies
4
use dump_r\Core;
5
6
// Internal dependencies
7
use nyx\diagnostics\debug\interfaces;
8
9
/**
10
 * Dump_r Dumper
11
 *
12
 * A bridge allowing to use Dump_r as a Dumper within the Debug subcomponent. Check out Dump_r itself on
13
 * Github at {@see https://github.com/leeoniya/dump_r.php}.
14
 *
15
 * Requires:
16
 * - Package: leeoniya/dump-r (available as suggestion for nyx/diagnostics within Composer)
17
 *
18
 * @version     0.1.0
19
 * @author      Michal Chojnacki <[email protected]>
20
 * @copyright   2012-2017 Nyx Dev Team
21
 * @link        https://github.com/unyx/nyx
22
 * @todo        Readable breaks between each variable dump.
23
 * @todo        Adjust the settings locally and apply them on each call to dump_r().
24
 */
25
class Dump_r implements interfaces\Dumper
26
{
27
    /**
28
     * {@inheritDoc}
29
     */
30
    public function __invoke(...$vars)
31
    {
32
        // Dump_r isn't variadic so we need to adapt.
33
        foreach ($vars as $var) {
34
            Core::dump_r($var);
35
        }
36
    }
37
}
38