| Conditions | 5 |
| Paths | 4 |
| Total Lines | 26 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 5.0073 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 1 | public function getBacktrace() |
|
| 39 | { |
||
| 40 | 1 | $backtrace = $this->get_debug_backtrace(); |
|
| 41 | |||
| 42 | 1 | $output = ""; |
|
| 43 | |||
| 44 | 1 | $count = 0; |
|
| 45 | 1 | foreach ($backtrace as $line) { |
|
| 46 | 1 | if ($count <= 1) { |
|
| 47 | 1 | $count++; |
|
| 48 | 1 | continue; |
|
| 49 | } |
||
| 50 | |||
| 51 | 1 | $output .= "#{$count}: "; |
|
| 52 | |||
| 53 | 1 | if (isset($line['type']) && $line['type'] != "") { |
|
| 54 | $output .= $line['class'] . $line['type']; |
||
| 55 | } |
||
| 56 | |||
| 57 | 1 | $output .= $line['function'] . "(...)"; |
|
| 58 | 1 | $output .= " [{$line['file']}#{$line['line']}\r\n"; |
|
| 59 | |||
| 60 | 1 | $count++; |
|
| 61 | } |
||
| 62 | |||
| 63 | 1 | return $output; |
|
| 64 | } |
||
| 66 |