Completed
Push — master ( a52247...91a49a )
by Zach
02:12
created

helpers.php ➔ dd()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 1
nop 0
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
use Phalcon\Debug\Dump;
4
5
if (!function_exists('dd')) {
6
    /**
7
     * Dump the passed variables and end the script.
8
     *
9
     * @param  mixed
10
     */
11
    function dd()
12
    {
13
        array_map(function ($x) {
14
            $string = (new Dump(null, true))->variable($x);
15
16
            echo PHP_SAPI == 'cli' ? strip_tags($string).PHP_EOL : $string;
17
        }, func_get_args());
18
19
        die(1);
20
    }
21
}
22