| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 55 | protected function generateNameFromClass(): string |
||
| 56 | { |
||
| 57 | $class = static::class; |
||
| 58 | $base = $this->getNamespace(); |
||
| 59 | if ($base && strpos($class, $base) ===0) { |
||
| 60 | return str_replace($base, '', $class); |
||
| 61 | } |
||
| 62 | try { |
||
| 63 | return (new ReflectionClass($this))->getShortName(); |
||
| 64 | } catch (\ReflectionException $e) { |
||
| 65 | return ''; |
||
| 66 | } |
||
| 69 |