| Conditions | 4 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4.016 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | 46 | public static function createName($target) |
|
| 35 | { |
||
| 36 | 46 | if (!$target) |
|
| 37 | 46 | { |
|
| 38 | return 'unknown'; |
||
| 39 | } |
||
| 40 | 46 | if ($target instanceof ReflectionMethod) |
|
| 41 | 46 | { |
|
| 42 | 8 | return $target->getDeclaringClass()->name . '@' . $target->name . '()'; |
|
| 43 | } |
||
| 44 | 46 | elseif ($target instanceof ReflectionProperty) |
|
| 45 | { |
||
| 46 | 20 | return $target->getDeclaringClass()->name . '@$' . $target->name; |
|
| 47 | } |
||
| 48 | else |
||
| 49 | { |
||
| 50 | 46 | return $target->name; |
|
| 51 | } |
||
| 52 | } |
||
| 53 | |||
| 55 |