Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | 6 | public function handle(mixed $variable, int $depth, bool $highlight = false): void |
|
13 | { |
||
14 | 6 | $varDumper = VarDumper::create($variable); |
|
15 | 6 | $output = $varDumper->asString($depth); |
|
16 | |||
17 | 6 | if ($highlight) { |
|
18 | 1 | $result = highlight_string("<?php\n" . $output, true); |
|
19 | 1 | $output = preg_replace('/<\\?php<br \\/>/', '', $result, 1); |
|
20 | } |
||
21 | |||
22 | 6 | echo $output; |
|
23 | } |
||
25 |