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 |
||
82 | protected function generateNameFromClass(): string |
||
83 | { |
||
84 | $class = static::class; |
||
85 | $base = $this->getNamespace(); |
||
86 | if ($base && strpos($class, $base) ===0) { |
||
87 | return str_replace($base, '', $class); |
||
88 | } |
||
89 | try { |
||
90 | return (new ReflectionClass($this))->getShortName(); |
||
91 | } catch (\ReflectionException $e) { |
||
92 | return ''; |
||
93 | } |
||
96 |