Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
10 | public static function method(int $depth = 3): string |
||
11 | { |
||
12 | $caller = static::get($depth); |
||
13 | $r = ''; |
||
14 | $function = $caller['function'] . '()'; |
||
15 | if (isset($caller['class'])) { |
||
16 | $type = $caller['type'] ?? ''; |
||
17 | $r .= $caller['class'] . $type . $function; |
||
18 | } else { |
||
19 | $r .= $function; |
||
20 | } |
||
21 | if (isset($caller['object'])) { |
||
22 | $r .= ' (' . \get_class($caller['object']) . ')'; |
||
23 | } |
||
24 | return $r; |
||
25 | } |
||
33 |