earnould /
laravel-velo-api
| 1 | <?php |
||
| 2 | |||
| 3 | if (! function_exists('ddl')) { |
||
| 4 | function ddl($var, ...$moreVars) |
||
| 5 | { |
||
| 6 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
||
| 7 | if (php_sapi_name() == 'cli') { |
||
| 8 | print_r("\e[1;30m dumped at: ".str_replace(base_path(), '', $trace[0]['file']).', line: '.$trace[0]['line']."\e[40m\n"); |
||
|
0 ignored issues
–
show
|
|||
| 9 | } else { |
||
| 10 | print_r('[dumped at: '.str_replace(base_path(), '', $trace[0]['file']).', line: '.$trace[0]['line']."]\n"); |
||
| 11 | } |
||
| 12 | |||
| 13 | return dd($var, ...$moreVars); |
||
| 14 | } |
||
| 15 | } |
||
| 16 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.