These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace IlluminateAgnostic\Arr\Support\Debug; |
||
4 | |||
5 | use Symfony\Component\VarDumper\Cloner\VarCloner; |
||
6 | use Symfony\Component\VarDumper\Dumper\CliDumper; |
||
7 | |||
8 | class Dumper |
||
9 | { |
||
10 | /** |
||
11 | * Dump a value with elegance. |
||
12 | * |
||
13 | * @param mixed $value |
||
14 | * @return void |
||
15 | */ |
||
16 | public function dump($value) |
||
17 | { |
||
18 | if (class_exists(CliDumper::class)) { |
||
19 | $dumper = in_array(PHP_SAPI, ['cli', 'phpdbg']) ? new CliDumper : new HtmlDumper; |
||
20 | |||
21 | $dumper->dump((new VarCloner)->cloneVar($value)); |
||
22 | } else { |
||
23 | var_dump($value); |
||
0 ignored issues
–
show
Security
Debugging Code
introduced
by
Loading history...
|
|||
24 | } |
||
25 | } |
||
26 | } |
||
27 |