Conditions | 5 |
Paths | 5 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | private function getCaller(): string |
||
36 | { |
||
37 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3); |
||
38 | $caller = ""; |
||
39 | $ignore = ["set", "get", "setCacheValue", "getCacheValue", "getCaller"]; |
||
40 | foreach ($trace as $t) { |
||
41 | if (in_array($t['function'], $ignore)) { |
||
42 | continue; |
||
43 | } |
||
44 | if (isset($t['file'])) { |
||
45 | $caller = basename($t['file']) . ':' . $t['line']; |
||
46 | } elseif (isset($t['class'])) { |
||
47 | $caller = $t['class']; |
||
48 | } |
||
49 | break; |
||
50 | } |
||
51 | return $caller; |
||
52 | } |
||
59 |