dd()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja;
15
16
use function var_dump;
17
18
/**
19
 * Dump the passed variables and die.
20
 *
21
 * @param mixed ...$args The arguments to dump
22
 *
23
 * @return never
24
 */
25
function dd(...$args): never
26
{
27
    var_dump($args);
0 ignored issues
show
Security Debugging Code introduced by
var_dump($args) looks like debug code. Are you sure you do not want to remove it?
Loading history...
28
29
    exit(1);
0 ignored issues
show
Best Practice introduced by
Using exit here is not recommended.

In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.

Loading history...
30
}
31