Conditions | 5 |
Paths | 4 |
Total Lines | 26 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 1 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
13 | public static function getBacktrace() |
||
14 | { |
||
15 | $backtrace = debug_backtrace(); |
||
16 | |||
17 | $output = ""; |
||
18 | |||
19 | $count = 0; |
||
20 | foreach ($backtrace as $line) { |
||
21 | if ($count == 0) { |
||
22 | $count++; |
||
23 | continue; |
||
24 | } |
||
25 | |||
26 | $output .= "#{$count}: "; |
||
27 | |||
28 | if (isset($line['type']) && $line['type'] != "") { |
||
29 | $output .= $line['class'] . $line['type']; |
||
30 | } |
||
31 | |||
32 | $output .= $line['function'] . "(...)"; |
||
33 | $output .= " [{$line['file']}#{$line['line']}\r\n"; |
||
34 | |||
35 | $count++; |
||
36 | } |
||
37 | |||
38 | return $output; |
||
39 | } |
||
41 |