Conditions | 5 |
Paths | 4 |
Total Lines | 27 |
Code Lines | 15 |
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 | } |
||
65 | } |
||
66 |
This check looks for method names that are not written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes
databaseConnectionSeeker
.